update server

This commit is contained in:
2026-06-20 16:17:52 +07:00
parent bec73c4836
commit 0ad9d400e3
2 changed files with 23 additions and 6 deletions
+10 -6
View File
@@ -1,18 +1,22 @@
package app
import (
proto "${REPO_NAME_SNAKE}/proto"
"context"
proto "${REPO_NAME_SNAKE}/proto"
)
type Server struct {
proto.Unimplemented${REPO_NAME_PASCAL}Server
type server struct {
proto.Unsafe{REPO_NAME_PASCAL}Server
}
func NewServer() *Server {
return &Server{}
func NewServer() proto.TestTemplateRepoServer {
return &server{}
}
func (s *Server) Ping(_ context.Context, _ *proto.PingReq) (*proto.PingRsp, error) {
func (s *server) Ping(_ context.Context, _ *proto.PingReq) (*proto.PingRsp, error) {
return &proto.PingRsp{}, nil
}
func (s *server) Echo(_ context.Context, req *proto.EchoReq) (*proto.EchoRsp, error) {
return &proto.EchoRsp{Text: req.Text}, nil
}