Documentation ¶
Index ¶
- type ExampleService
- func (self *ExampleService) Connect(cc grpc.ClientConnInterface) proto.ExampleServiceClient
- func (self *ExampleService) GetClient(route string) (proto.ExampleServiceClient, error)
- func (self *ExampleService) SayHello(ctx context.Context, req *proto.HelloRequest) (*proto.HelloReply, error)
- func (self *ExampleService) Serve(s grpc.ServiceRegistrar)
- type PostService
- type UserService
- func (self *UserService) Connect(cc grpc.ClientConnInterface) services_proto.UserServiceClient
- func (self *UserService) GetClient(route string) (services_proto.UserServiceClient, error)
- func (self *UserService) GetMyPosts(ctx context.Context, query *services_proto.UserQuery) (*services_proto.PostSearchResult, error)
- func (self *UserService) GetUser(ctx context.Context, query *services_proto.UserQuery) (*services_proto.User, error)
- func (self *UserService) GetUsers(ctx context.Context, query *services_proto.UsersQuery) (*services_proto.UserQueryResult, error)
- func (self *UserService) Serve(s grpc.ServiceRegistrar)
- func (self *UserService) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExampleService ¶
type ExampleService struct {
proto.UnimplementedExampleServiceServer
}
func (*ExampleService) Connect ¶
func (self *ExampleService) Connect(cc grpc.ClientConnInterface) proto.ExampleServiceClient
func (*ExampleService) GetClient ¶
func (self *ExampleService) GetClient(route string) (proto.ExampleServiceClient, error)
func (*ExampleService) SayHello ¶
func (self *ExampleService) SayHello(ctx context.Context, req *proto.HelloRequest) (*proto.HelloReply, error)
func (*ExampleService) Serve ¶
func (self *ExampleService) Serve(s grpc.ServiceRegistrar)
type PostService ¶
type PostService struct{}
func (*PostService) Connect ¶
func (self *PostService) Connect(cc grpc.ClientConnInterface) services_proto.PostServiceClient
func (*PostService) GetClient ¶
func (self *PostService) GetClient(route string) (services_proto.PostServiceClient, error)
type UserService ¶
type UserService struct { services_proto.UnimplementedUserServiceServer PostSrv *PostService // set as exported field for dependency injection // contains filtered or unexported fields }
func (*UserService) Connect ¶
func (self *UserService) Connect(cc grpc.ClientConnInterface) services_proto.UserServiceClient
func (*UserService) GetClient ¶
func (self *UserService) GetClient(route string) (services_proto.UserServiceClient, error)
func (*UserService) GetMyPosts ¶
func (self *UserService) GetMyPosts( ctx context.Context, query *services_proto.UserQuery, ) (*services_proto.PostSearchResult, error)
func (*UserService) GetUser ¶
func (self *UserService) GetUser(ctx context.Context, query *services_proto.UserQuery) (*services_proto.User, error)
func (*UserService) GetUsers ¶
func (self *UserService) GetUsers( ctx context.Context, query *services_proto.UsersQuery, ) (*services_proto.UserQueryResult, error)
func (*UserService) Serve ¶
func (self *UserService) Serve(s grpc.ServiceRegistrar)
func (*UserService) Stop ¶
func (self *UserService) Stop()
Click to show internal directories.
Click to hide internal directories.