Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AuthUserReq
- func (*AuthUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *AuthUserReq) GetNickname() string
- func (x *AuthUserReq) GetPassword() string
- func (*AuthUserReq) ProtoMessage()
- func (x *AuthUserReq) ProtoReflect() protoreflect.Message
- func (x *AuthUserReq) Reset()
- func (x *AuthUserReq) String() string
- type AuthUserRsp
- type CreateUserReq
- func (*CreateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserReq) GetNickname() string
- func (x *CreateUserReq) GetPassword() string
- func (*CreateUserReq) ProtoMessage()
- func (x *CreateUserReq) ProtoReflect() protoreflect.Message
- func (x *CreateUserReq) Reset()
- func (x *CreateUserReq) String() string
- type CreateUserRsp
- type GetUserReq
- type GetUserRsp
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) AuthUser(context.Context, *AuthUserReq) (*AuthUserRsp, error)
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserReq) (*CreateUserRsp, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserReq) (*GetUserRsp, error)
- type UnsafeUserServiceServer
- type UserServiceClient
- type UserServiceServer
Constants ¶
const (
ServiceName = "user"
)
Variables ¶
var File_user_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AuthUser", Handler: _UserService_AuthUser_Handler, }, { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type AuthUserReq ¶
type AuthUserReq struct { Nickname string `protobuf:"bytes,1,opt,name=Nickname,proto3" json:"Nickname,omitempty"` Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"` // contains filtered or unexported fields }
func (*AuthUserReq) Descriptor
deprecated
func (*AuthUserReq) Descriptor() ([]byte, []int)
Deprecated: Use AuthUserReq.ProtoReflect.Descriptor instead.
func (*AuthUserReq) GetNickname ¶
func (x *AuthUserReq) GetNickname() string
func (*AuthUserReq) GetPassword ¶
func (x *AuthUserReq) GetPassword() string
func (*AuthUserReq) ProtoMessage ¶
func (*AuthUserReq) ProtoMessage()
func (*AuthUserReq) ProtoReflect ¶
func (x *AuthUserReq) ProtoReflect() protoreflect.Message
func (*AuthUserReq) Reset ¶
func (x *AuthUserReq) Reset()
func (*AuthUserReq) String ¶
func (x *AuthUserReq) String() string
type AuthUserRsp ¶
type AuthUserRsp struct { Valid bool `protobuf:"varint,1,opt,name=Valid,proto3" json:"Valid,omitempty"` UserID int64 `protobuf:"varint,2,opt,name=UserID,proto3" json:"UserID,omitempty"` // contains filtered or unexported fields }
func (*AuthUserRsp) Descriptor
deprecated
func (*AuthUserRsp) Descriptor() ([]byte, []int)
Deprecated: Use AuthUserRsp.ProtoReflect.Descriptor instead.
func (*AuthUserRsp) GetUserID ¶
func (x *AuthUserRsp) GetUserID() int64
func (*AuthUserRsp) GetValid ¶
func (x *AuthUserRsp) GetValid() bool
func (*AuthUserRsp) ProtoMessage ¶
func (*AuthUserRsp) ProtoMessage()
func (*AuthUserRsp) ProtoReflect ¶
func (x *AuthUserRsp) ProtoReflect() protoreflect.Message
func (*AuthUserRsp) Reset ¶
func (x *AuthUserRsp) Reset()
func (*AuthUserRsp) String ¶
func (x *AuthUserRsp) String() string
type CreateUserReq ¶
type CreateUserReq struct { Nickname string `protobuf:"bytes,1,opt,name=Nickname,proto3" json:"Nickname,omitempty"` Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"` // contains filtered or unexported fields }
func (*CreateUserReq) Descriptor
deprecated
func (*CreateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.
func (*CreateUserReq) GetNickname ¶
func (x *CreateUserReq) GetNickname() string
func (*CreateUserReq) GetPassword ¶
func (x *CreateUserReq) GetPassword() string
func (*CreateUserReq) ProtoMessage ¶
func (*CreateUserReq) ProtoMessage()
func (*CreateUserReq) ProtoReflect ¶
func (x *CreateUserReq) ProtoReflect() protoreflect.Message
func (*CreateUserReq) Reset ¶
func (x *CreateUserReq) Reset()
func (*CreateUserReq) String ¶
func (x *CreateUserReq) String() string
type CreateUserRsp ¶
type CreateUserRsp struct { UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRsp) Descriptor
deprecated
func (*CreateUserRsp) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRsp.ProtoReflect.Descriptor instead.
func (*CreateUserRsp) GetUserID ¶
func (x *CreateUserRsp) GetUserID() int64
func (*CreateUserRsp) ProtoMessage ¶
func (*CreateUserRsp) ProtoMessage()
func (*CreateUserRsp) ProtoReflect ¶
func (x *CreateUserRsp) ProtoReflect() protoreflect.Message
func (*CreateUserRsp) Reset ¶
func (x *CreateUserRsp) Reset()
func (*CreateUserRsp) String ¶
func (x *CreateUserRsp) String() string
type GetUserReq ¶
type GetUserReq struct { UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` // contains filtered or unexported fields }
func (*GetUserReq) Descriptor
deprecated
func (*GetUserReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserReq.ProtoReflect.Descriptor instead.
func (*GetUserReq) GetUserID ¶
func (x *GetUserReq) GetUserID() int64
func (*GetUserReq) ProtoMessage ¶
func (*GetUserReq) ProtoMessage()
func (*GetUserReq) ProtoReflect ¶
func (x *GetUserReq) ProtoReflect() protoreflect.Message
func (*GetUserReq) Reset ¶
func (x *GetUserReq) Reset()
func (*GetUserReq) String ¶
func (x *GetUserReq) String() string
type GetUserRsp ¶
type GetUserRsp struct { Nickname string `protobuf:"bytes,1,opt,name=Nickname,proto3" json:"Nickname,omitempty"` Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"` // contains filtered or unexported fields }
func (*GetUserRsp) Descriptor
deprecated
func (*GetUserRsp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRsp.ProtoReflect.Descriptor instead.
func (*GetUserRsp) GetNickname ¶
func (x *GetUserRsp) GetNickname() string
func (*GetUserRsp) GetPassword ¶
func (x *GetUserRsp) GetPassword() string
func (*GetUserRsp) ProtoMessage ¶
func (*GetUserRsp) ProtoMessage()
func (*GetUserRsp) ProtoReflect ¶
func (x *GetUserRsp) ProtoReflect() protoreflect.Message
func (*GetUserRsp) Reset ¶
func (x *GetUserRsp) Reset()
func (*GetUserRsp) String ¶
func (x *GetUserRsp) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) AuthUser ¶
func (UnimplementedUserServiceServer) AuthUser(context.Context, *AuthUserReq) (*AuthUserRsp, error)
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserReq) (*CreateUserRsp, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserReq) (*GetUserRsp, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UserServiceClient ¶
type UserServiceClient interface { AuthUser(ctx context.Context, in *AuthUserReq, opts ...grpc.CallOption) (*AuthUserRsp, error) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserRsp, error) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserRsp, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { AuthUser(context.Context, *AuthUserReq) (*AuthUserRsp, error) CreateUser(context.Context, *CreateUserReq) (*CreateUserRsp, error) GetUser(context.Context, *GetUserReq) (*GetUserRsp, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility