Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
- type CheckPasswordRequest
- func (*CheckPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckPasswordRequest) GetPassword() string
- func (x *CheckPasswordRequest) GetUsername() string
- func (*CheckPasswordRequest) ProtoMessage()
- func (x *CheckPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *CheckPasswordRequest) Reset()
- func (x *CheckPasswordRequest) String() string
- type CheckPasswordResponse
- func (*CheckPasswordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckPasswordResponse) GetOk() bool
- func (*CheckPasswordResponse) ProtoMessage()
- func (x *CheckPasswordResponse) ProtoReflect() protoreflect.Message
- func (x *CheckPasswordResponse) Reset()
- func (x *CheckPasswordResponse) String() string
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetMobile() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type GetUserRequest
- type GetUserResponse
- func (*GetUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserResponse) GetEmail() string
- func (x *GetUserResponse) GetId() int64
- func (x *GetUserResponse) GetMobile() string
- func (x *GetUserResponse) GetUsername() string
- func (*GetUserResponse) ProtoMessage()
- func (x *GetUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserResponse) Reset()
- func (x *GetUserResponse) String() string
- type GreetRequest
- type GreetResponse
- type GreetServiceClient
- type GreetServiceServer
- type GreetService_GreetManyTimesClient
- type GreetService_GreetManyTimesServer
- type UnimplementedGreetServiceServer
- func (UnimplementedGreetServiceServer) CheckPassword(context.Context, *CheckPasswordRequest) (*CheckPasswordResponse, error)
- func (UnimplementedGreetServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (UnimplementedGreetServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
- func (UnimplementedGreetServiceServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
- func (UnimplementedGreetServiceServer) GreetManyTimes(*GreetRequest, GreetService_GreetManyTimesServer) error
- type UnsafeGreetServiceServer
Constants ¶
const ( GreetService_Greet_FullMethodName = "/proto.GreetService/Greet" GreetService_GreetManyTimes_FullMethodName = "/proto.GreetService/GreetManyTimes" GreetService_GetUser_FullMethodName = "/proto.GreetService/GetUser" GreetService_CreateUser_FullMethodName = "/proto.GreetService/CreateUser" GreetService_CheckPassword_FullMethodName = "/proto.GreetService/CheckPassword" )
Variables ¶
var File_hello_proto protoreflect.FileDescriptor
var GreetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.GreetService", HandlerType: (*GreetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Greet", Handler: _GreetService_Greet_Handler, }, { MethodName: "GetUser", Handler: _GreetService_GetUser_Handler, }, { MethodName: "CreateUser", Handler: _GreetService_CreateUser_Handler, }, { MethodName: "CheckPassword", Handler: _GreetService_CheckPassword_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GreetManyTimes", Handler: _GreetService_GreetManyTimes_Handler, ServerStreams: true, }, }, Metadata: "hello.proto", }
GreetService_ServiceDesc is the grpc.ServiceDesc for GreetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetServiceServer ¶
func RegisterGreetServiceServer(s grpc.ServiceRegistrar, srv GreetServiceServer)
Types ¶
type CheckPasswordRequest ¶
type CheckPasswordRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*CheckPasswordRequest) Descriptor
deprecated
func (*CheckPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckPasswordRequest.ProtoReflect.Descriptor instead.
func (*CheckPasswordRequest) GetPassword ¶
func (x *CheckPasswordRequest) GetPassword() string
func (*CheckPasswordRequest) GetUsername ¶
func (x *CheckPasswordRequest) GetUsername() string
func (*CheckPasswordRequest) ProtoMessage ¶
func (*CheckPasswordRequest) ProtoMessage()
func (*CheckPasswordRequest) ProtoReflect ¶
func (x *CheckPasswordRequest) ProtoReflect() protoreflect.Message
func (*CheckPasswordRequest) Reset ¶
func (x *CheckPasswordRequest) Reset()
func (*CheckPasswordRequest) String ¶
func (x *CheckPasswordRequest) String() string
type CheckPasswordResponse ¶
type CheckPasswordResponse struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
func (*CheckPasswordResponse) Descriptor
deprecated
func (*CheckPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckPasswordResponse.ProtoReflect.Descriptor instead.
func (*CheckPasswordResponse) GetOk ¶
func (x *CheckPasswordResponse) GetOk() bool
func (*CheckPasswordResponse) ProtoMessage ¶
func (*CheckPasswordResponse) ProtoMessage()
func (*CheckPasswordResponse) ProtoReflect ¶
func (x *CheckPasswordResponse) ProtoReflect() protoreflect.Message
func (*CheckPasswordResponse) Reset ¶
func (x *CheckPasswordResponse) Reset()
func (*CheckPasswordResponse) String ¶
func (x *CheckPasswordResponse) String() string
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Mobile string `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetMobile ¶
func (x *CreateUserRequest) GetMobile() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetId ¶
func (x *CreateUserResponse) GetId() int64
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() int64
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetEmail ¶
func (x *GetUserResponse) GetEmail() string
func (*GetUserResponse) GetId ¶
func (x *GetUserResponse) GetId() int64
func (*GetUserResponse) GetMobile ¶
func (x *GetUserResponse) GetMobile() string
func (*GetUserResponse) GetUsername ¶
func (x *GetUserResponse) GetUsername() string
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
type GreetRequest ¶
type GreetRequest struct { Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` // contains filtered or unexported fields }
func (*GreetRequest) Descriptor
deprecated
func (*GreetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GreetRequest.ProtoReflect.Descriptor instead.
func (*GreetRequest) GetGreeting ¶
func (x *GreetRequest) GetGreeting() string
func (*GreetRequest) ProtoMessage ¶
func (*GreetRequest) ProtoMessage()
func (*GreetRequest) ProtoReflect ¶
func (x *GreetRequest) ProtoReflect() protoreflect.Message
func (*GreetRequest) Reset ¶
func (x *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (x *GreetRequest) String() string
type GreetResponse ¶
type GreetResponse struct { Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*GreetResponse) Descriptor
deprecated
func (*GreetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GreetResponse.ProtoReflect.Descriptor instead.
func (*GreetResponse) GetResult ¶
func (x *GreetResponse) GetResult() string
func (*GreetResponse) ProtoMessage ¶
func (*GreetResponse) ProtoMessage()
func (*GreetResponse) ProtoReflect ¶
func (x *GreetResponse) ProtoReflect() protoreflect.Message
func (*GreetResponse) Reset ¶
func (x *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (x *GreetResponse) String() string
type GreetServiceClient ¶
type GreetServiceClient interface { Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error) GreetManyTimes(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (GreetService_GreetManyTimesClient, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) CheckPassword(ctx context.Context, in *CheckPasswordRequest, opts ...grpc.CallOption) (*CheckPasswordResponse, error) }
GreetServiceClient is the client API for GreetService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGreetServiceClient ¶
func NewGreetServiceClient(cc grpc.ClientConnInterface) GreetServiceClient
type GreetServiceServer ¶
type GreetServiceServer interface { Greet(context.Context, *GreetRequest) (*GreetResponse, error) GreetManyTimes(*GreetRequest, GreetService_GreetManyTimesServer) error GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) CheckPassword(context.Context, *CheckPasswordRequest) (*CheckPasswordResponse, error) // contains filtered or unexported methods }
GreetServiceServer is the server API for GreetService service. All implementations must embed UnimplementedGreetServiceServer for forward compatibility
type GreetService_GreetManyTimesClient ¶
type GreetService_GreetManyTimesClient interface { Recv() (*GreetResponse, error) grpc.ClientStream }
type GreetService_GreetManyTimesServer ¶
type GreetService_GreetManyTimesServer interface { Send(*GreetResponse) error grpc.ServerStream }
type UnimplementedGreetServiceServer ¶
type UnimplementedGreetServiceServer struct { }
UnimplementedGreetServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGreetServiceServer) CheckPassword ¶
func (UnimplementedGreetServiceServer) CheckPassword(context.Context, *CheckPasswordRequest) (*CheckPasswordResponse, error)
func (UnimplementedGreetServiceServer) CreateUser ¶
func (UnimplementedGreetServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedGreetServiceServer) GetUser ¶
func (UnimplementedGreetServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
func (UnimplementedGreetServiceServer) Greet ¶
func (UnimplementedGreetServiceServer) Greet(context.Context, *GreetRequest) (*GreetResponse, error)
func (UnimplementedGreetServiceServer) GreetManyTimes ¶
func (UnimplementedGreetServiceServer) GreetManyTimes(*GreetRequest, GreetService_GreetManyTimesServer) error
type UnsafeGreetServiceServer ¶
type UnsafeGreetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetServiceServer will result in compilation errors.