user

package
v0.0.0-...-dd7b778 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewUserClientProxy = func(opts ...client.Option) UserClientProxy {
	return &UserClientProxyImpl{client: client.DefaultClient, opts: opts}
}
View Source
var UserServer_ServiceDesc = server.ServiceDesc{
	ServiceName: "trpc.demo.account.User",
	HandlerType: ((*UserService)(nil)),
	Methods: []server.Method{
		{
			Name: "/trpc.demo.account.User/GetAccountByUserName",
			Func: UserService_GetAccountByUserName_Handler,
		},
	},
}

UserServer_ServiceDesc descriptor for server.RegisterService.

Functions

func RegisterUserService

func RegisterUserService(s server.Service, svr UserService)

RegisterUserService registers service.

func UserService_GetAccountByUserName_Handler

func UserService_GetAccountByUserName_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

Types

type GetAccountByUserNameRequest

type GetAccountByUserNameRequest struct {
	Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Username string           `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountByUserNameRequest) Descriptor deprecated

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

Deprecated: Use GetAccountByUserNameRequest.ProtoReflect.Descriptor instead.

func (*GetAccountByUserNameRequest) GetMetadata

func (x *GetAccountByUserNameRequest) GetMetadata() *common.Metadata

func (*GetAccountByUserNameRequest) GetUsername

func (x *GetAccountByUserNameRequest) GetUsername() string

func (*GetAccountByUserNameRequest) ProtoMessage

func (*GetAccountByUserNameRequest) ProtoMessage()

func (*GetAccountByUserNameRequest) ProtoReflect

func (*GetAccountByUserNameRequest) Reset

func (x *GetAccountByUserNameRequest) Reset()

func (*GetAccountByUserNameRequest) String

func (x *GetAccountByUserNameRequest) String() string

type GetAccountByUserNameResponse

type GetAccountByUserNameResponse struct {
	ErrCode int32                              `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"`
	ErrMsg  string                             `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
	Data    *GetAccountByUserNameResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountByUserNameResponse) Descriptor deprecated

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

Deprecated: Use GetAccountByUserNameResponse.ProtoReflect.Descriptor instead.

func (*GetAccountByUserNameResponse) GetData

func (*GetAccountByUserNameResponse) GetErrCode

func (x *GetAccountByUserNameResponse) GetErrCode() int32

func (*GetAccountByUserNameResponse) GetErrMsg

func (x *GetAccountByUserNameResponse) GetErrMsg() string

func (*GetAccountByUserNameResponse) ProtoMessage

func (*GetAccountByUserNameResponse) ProtoMessage()

func (*GetAccountByUserNameResponse) ProtoReflect

func (*GetAccountByUserNameResponse) Reset

func (x *GetAccountByUserNameResponse) Reset()

func (*GetAccountByUserNameResponse) String

type GetAccountByUserNameResponse_Data

type GetAccountByUserNameResponse_Data struct {
	UserInfo *UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountByUserNameResponse_Data) Descriptor deprecated

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

Deprecated: Use GetAccountByUserNameResponse_Data.ProtoReflect.Descriptor instead.

func (*GetAccountByUserNameResponse_Data) GetUserInfo

func (x *GetAccountByUserNameResponse_Data) GetUserInfo() *UserInfo

func (*GetAccountByUserNameResponse_Data) ProtoMessage

func (*GetAccountByUserNameResponse_Data) ProtoMessage()

func (*GetAccountByUserNameResponse_Data) ProtoReflect

func (*GetAccountByUserNameResponse_Data) Reset

func (*GetAccountByUserNameResponse_Data) String

type UnimplementedUser

type UnimplementedUser struct{}

func (*UnimplementedUser) GetAccountByUserName

type UserClientProxy

type UserClientProxy interface {
	GetAccountByUserName(ctx context.Context, req *GetAccountByUserNameRequest, opts ...client.Option) (rsp *GetAccountByUserNameResponse, err error)
}

UserClientProxy defines service client proxy

type UserClientProxyImpl

type UserClientProxyImpl struct {
	// contains filtered or unexported fields
}

func (*UserClientProxyImpl) GetAccountByUserName

type UserInfo

type UserInfo struct {
	UserId       string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Username     string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	PasswordHash string `protobuf:"bytes,3,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"`
	Nickname     string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	CreateTsSec  int64  `protobuf:"varint,5,opt,name=create_ts_sec,json=createTsSec,proto3" json:"create_ts_sec,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetCreateTsSec

func (x *UserInfo) GetCreateTsSec() int64

func (*UserInfo) GetNickname

func (x *UserInfo) GetNickname() string

func (*UserInfo) GetPasswordHash

func (x *UserInfo) GetPasswordHash() string

func (*UserInfo) GetUserId

func (x *UserInfo) GetUserId() string

func (*UserInfo) GetUsername

func (x *UserInfo) GetUsername() string

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

type UserService

type UserService interface {
	GetAccountByUserName(ctx context.Context, req *GetAccountByUserNameRequest) (*GetAccountByUserNameResponse, error)
}

UserService defines service.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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