Documentation
¶
Index ¶
- type Server
- func (s *Server) Close(ctx context.Context) error
- func (s *Server) DeleteUser(ctx context.Context, in *gen.UserIdentifier) (*emptypb.Empty, error)
- func (s *Server) GetUserInfo(ctx context.Context, in *gen.UserIdentifier) (*gen.User, error)
- func (s *Server) RunGrpc(ctx context.Context, port string) error
- func (s *Server) SendUserAction(ctx context.Context, in *gen.Action) (*emptypb.Empty, error)
- func (s *Server) SetupGateway(ctx context.Context, port string, grpcPort string) error
- func (s *Server) UpdateUser(ctx context.Context, in *gen.User) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { gen.UnimplementedUserActionServer GWServer *http.Server }
func (*Server) DeleteUser ¶
DeleteUser deletes a user curl localhost:8090/user/delete/1 -X DELETE
func (*Server) GetUserInfo ¶
GetUserInfo gets a user curl localhost:8090/user/getinfo/1
func (*Server) SendUserAction ¶
SendUserAction sends a user action curl localhost:8090/user/action -X -d '{"action": 1, "userId": 1}'
func (*Server) SetupGateway ¶
SetupGateway creates the Rest server via grpc connection/
Click to show internal directories.
Click to hide internal directories.