user

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 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,
		},
	},
	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) 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 {
	Code  int64  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg   string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data  string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// 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) GetError

func (x *UserCommonResponse) GetError() 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 {
	Code       int64     `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	UserDetail *UserResp `protobuf:"bytes,2,opt,name=user_detail,json=userDetail,proto3" json:"user_detail,omitempty"`
	// 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() *UserResp

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 UserLoginReq

type UserLoginReq struct {

	// @inject_tag:form:"user_name" uri:"user_name"
	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty" form:"user_name" uri:"user_name"`
	// @inject_tag:form:"password" uri:"password"
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty" form:"password" uri:"password"`
	// contains filtered or unexported fields
}

func (*UserLoginReq) Descriptor deprecated

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

Deprecated: Use UserLoginReq.ProtoReflect.Descriptor instead.

func (*UserLoginReq) GetPassword

func (x *UserLoginReq) GetPassword() string

func (*UserLoginReq) GetUserName

func (x *UserLoginReq) GetUserName() string

func (*UserLoginReq) ProtoMessage

func (*UserLoginReq) ProtoMessage()

func (*UserLoginReq) ProtoReflect

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

func (*UserLoginReq) Reset

func (x *UserLoginReq) Reset()

func (*UserLoginReq) String

func (x *UserLoginReq) String() string

type UserRegisterReq

type UserRegisterReq struct {

	// @inject_tag:form:"nick_name" uri:"nick_name"
	NickName string `protobuf:"bytes,1,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty" form:"nick_name" uri:"nick_name"`
	// @inject_tag:form:"user_name" uri:"user_name"
	UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty" form:"user_name" uri:"user_name"`
	// @inject_tag:form:"password" uri:"password"
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty" form:"password" uri:"password"`
	// @inject_tag:form:"password_confirm" uri:"password_confirm"
	PasswordConfirm string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UserRegisterReq) Descriptor deprecated

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

Deprecated: Use UserRegisterReq.ProtoReflect.Descriptor instead.

func (*UserRegisterReq) GetNickName

func (x *UserRegisterReq) GetNickName() string

func (*UserRegisterReq) GetPassword

func (x *UserRegisterReq) GetPassword() string

func (*UserRegisterReq) GetPasswordConfirm

func (x *UserRegisterReq) GetPasswordConfirm() string

func (*UserRegisterReq) GetUserName

func (x *UserRegisterReq) GetUserName() string

func (*UserRegisterReq) ProtoMessage

func (*UserRegisterReq) ProtoMessage()

func (*UserRegisterReq) ProtoReflect

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

func (*UserRegisterReq) Reset

func (x *UserRegisterReq) Reset()

func (*UserRegisterReq) String

func (x *UserRegisterReq) String() string

type UserResp

type UserResp struct {
	UserId   int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	NickName string `protobuf:"bytes,3,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResp) Descriptor deprecated

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

Deprecated: Use UserResp.ProtoReflect.Descriptor instead.

func (*UserResp) GetNickName

func (x *UserResp) GetNickName() string

func (*UserResp) GetUserId

func (x *UserResp) GetUserId() int64

func (*UserResp) GetUserName

func (x *UserResp) GetUserName() string

func (*UserResp) ProtoMessage

func (*UserResp) ProtoMessage()

func (*UserResp) ProtoReflect

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

func (*UserResp) Reset

func (x *UserResp) Reset()

func (*UserResp) String

func (x *UserResp) String() string

type UserServiceClient

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