mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 17:45:17 +03:00
22 lines
380 B
Go
22 lines
380 B
Go
package grpc
|
|
|
|
import (
|
|
"context"
|
|
|
|
pb "github.com/lorsanstand/HomeOps-Hub/api/gen/homeops"
|
|
"google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
type Server struct {
|
|
pb.UnimplementedHubServer
|
|
}
|
|
|
|
func NewServer() *Server {
|
|
return &Server{}
|
|
}
|
|
|
|
func (s *Server) Ping(ctx context.Context, _ *emptypb.Empty) (*pb.PongResponse, error) {
|
|
return &pb.PongResponse{Pong: "Pong"}, nil
|
|
|
|
}
|