user

package
v0.0.0-...-0a789b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UserLogin",
			Handler:    _UserService_UserLogin_Handler,
		},
		{
			MethodName: "UserRegister",
			Handler:    _UserService_UserRegister_Handler,
		},
		{
			MethodName: "UserLogout",
			Handler:    _UserService_UserLogout_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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 UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) UserLogin

func (UnimplementedUserServiceServer) UserLogout

func (UnimplementedUserServiceServer) UserRegister

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 UserCommonResponse

type UserCommonResponse struct {

	// @inject_tag: json:"code" form:"code"" uri:"code""
	Code int64 `protobuf:"varint,1,opt,name=Code,proto3" json:"code" form:"code" uri:"code"`
	// @inject_tag: json:"msg" form:"msg"" uri:"msg""
	Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"msg" form:"msg" uri:"msg"`
	// @inject_tag: json:"data" form:"data"" uri:"data""
	Data string `protobuf:"bytes,3,opt,name=Data,proto3" json:"data" form:"data" uri:"data"`
	// contains filtered or unexported fields
}

func (*UserCommonResponse) Descriptor deprecated

func (*UserCommonResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserCommonResponse.ProtoReflect.Descriptor instead.

func (*UserCommonResponse) GetCode

func (x *UserCommonResponse) GetCode() int64

func (*UserCommonResponse) GetData

func (x *UserCommonResponse) GetData() string

func (*UserCommonResponse) GetMsg

func (x *UserCommonResponse) GetMsg() string

func (*UserCommonResponse) ProtoMessage

func (*UserCommonResponse) ProtoMessage()

func (*UserCommonResponse) ProtoReflect

func (x *UserCommonResponse) ProtoReflect() protoreflect.Message

func (*UserCommonResponse) Reset

func (x *UserCommonResponse) Reset()

func (*UserCommonResponse) String

func (x *UserCommonResponse) String() string

type UserDetailResponse

type UserDetailResponse struct {

	// @inject_tag: json:"user_response" form:"user_response" uri:"user_response"
	UserDetail *UserResponse `protobuf:"bytes,1,opt,name=UserDetail,proto3" json:"user_response" form:"user_response" uri:"user_response"`
	// @inject_tag: json:"code" form:"code"" uri:"code""
	Code int64 `protobuf:"varint,2,opt,name=Code,proto3" json:"code" form:"code" uri:"code"`
	// contains filtered or unexported fields
}

func (*UserDetailResponse) Descriptor deprecated

func (*UserDetailResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserDetailResponse.ProtoReflect.Descriptor instead.

func (*UserDetailResponse) GetCode

func (x *UserDetailResponse) GetCode() int64

func (*UserDetailResponse) GetUserDetail

func (x *UserDetailResponse) GetUserDetail() *UserResponse

func (*UserDetailResponse) ProtoMessage

func (*UserDetailResponse) ProtoMessage()

func (*UserDetailResponse) ProtoReflect

func (x *UserDetailResponse) ProtoReflect() protoreflect.Message

func (*UserDetailResponse) Reset

func (x *UserDetailResponse) Reset()

func (*UserDetailResponse) String

func (x *UserDetailResponse) String() string

type UserRequest

type UserRequest struct {

	// @inject_tag: json:"nick_name" form:"nick_name" uri:"nick_name"
	NickName string `protobuf:"bytes,1,opt,name=NickName,proto3" json:"nick_name" form:"nick_name" uri:"nick_name"`
	// @inject_tag: json:"user_name" form:"user_name" uri:"user_name"
	UserName string `protobuf:"bytes,2,opt,name=UserName,proto3" json:"user_name" form:"user_name" uri:"user_name"`
	// @inject_tag: json:"password" form:"password" uri:"password"
	Password string `protobuf:"bytes,3,opt,name=Password,proto3" json:"password" form:"password" uri:"password"`
	// @inject_tag: json:"password_confirm" form:"password_confirm" uri:"password_confirm"
	PasswordConfirm string `protobuf:"bytes,4,opt,name=PasswordConfirm,proto3" json:"password_confirm" form:"password_confirm" uri:"password_confirm"`
	// contains filtered or unexported fields
}

func (*UserRequest) Descriptor deprecated

func (*UserRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetNickName

func (x *UserRequest) GetNickName() string

func (*UserRequest) GetPassword

func (x *UserRequest) GetPassword() string

func (*UserRequest) GetPasswordConfirm

func (x *UserRequest) GetPasswordConfirm() string

func (*UserRequest) GetUserName

func (x *UserRequest) GetUserName() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) ProtoReflect

func (x *UserRequest) ProtoReflect() protoreflect.Message

func (*UserRequest) Reset

func (x *UserRequest) Reset()

func (*UserRequest) String

func (x *UserRequest) String() string

type UserResponse

type UserResponse struct {

	// @inject_tag: json:"user_id" form:"user_id" uri:"user_id"
	UserId int64 `protobuf:"varint,1,opt,name=UserId,proto3" json:"user_id" form:"user_id" uri:"user_id"`
	// @inject_tag: json:"nick_name" form:"nick_name" uri:"nick_name"
	NickName string `protobuf:"bytes,2,opt,name=NickName,proto3" json:"nick_name" form:"nick_name" uri:"nick_name"`
	// @inject_tag: json:"user_name" form:"user_name" uri:"user_name"
	UserName string `protobuf:"bytes,3,opt,name=UserName,proto3" json:"user_name" form:"user_name" uri:"user_name"`
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated

func (*UserResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetNickName

func (x *UserResponse) GetNickName() string

func (*UserResponse) GetUserId

func (x *UserResponse) GetUserId() int64

func (*UserResponse) GetUserName

func (x *UserResponse) GetUserName() string

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

func (x *UserResponse) ProtoReflect() protoreflect.Message

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

type UserServiceClient

type UserServiceClient interface {
	UserLogin(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserDetailResponse, error)
	UserRegister(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserCommonResponse, error)
	UserLogout(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserCommonResponse, 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.

type UserServiceServer

type UserServiceServer interface {
	UserLogin(context.Context, *UserRequest) (*UserDetailResponse, error)
	UserRegister(context.Context, *UserRequest) (*UserCommonResponse, error)
	UserLogout(context.Context, *UserRequest) (*UserCommonResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL