Documentation ¶
Index ¶
- Variables
- func NewUserEndpoints() []*api.Endpoint
- func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
- type ConfigReq
- func (*ConfigReq) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigReq) GetConfigs() string
- func (x *ConfigReq) GetId() uint32
- func (x *ConfigReq) GetUserID() uint32
- func (*ConfigReq) ProtoMessage()
- func (x *ConfigReq) ProtoReflect() protoreflect.Message
- func (x *ConfigReq) Reset()
- func (x *ConfigReq) String() string
- type ConfigResp
- func (*ConfigResp) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigResp) GetConfigs() string
- func (x *ConfigResp) GetId() uint32
- func (x *ConfigResp) GetUserID() uint32
- func (*ConfigResp) ProtoMessage()
- func (x *ConfigResp) ProtoReflect() protoreflect.Message
- func (x *ConfigResp) Reset()
- func (x *ConfigResp) String() string
- type DeleteResp
- type IdReq
- type InitializeReq
- func (*InitializeReq) Descriptor() ([]byte, []int)deprecated
- func (x *InitializeReq) GetEmail() string
- func (x *InitializeReq) GetPassword() string
- func (x *InitializeReq) GetPhoneNumber() string
- func (x *InitializeReq) GetRoutes() string
- func (x *InitializeReq) GetUserName() string
- func (*InitializeReq) ProtoMessage()
- func (x *InitializeReq) ProtoReflect() protoreflect.Message
- func (x *InitializeReq) Reset()
- func (x *InitializeReq) String() string
- type InitializeResp
- type InitializedResp
- type Nop
- type Parameter
- type Query
- func (*Query) Descriptor() ([]byte, []int)deprecated
- func (x *Query) GetLimit() uint32
- func (x *Query) GetOffset() uint32
- func (x *Query) GetPage() uint32
- func (x *Query) GetPerPage() uint32
- func (x *Query) GetQueryParams() []*Parameter
- func (x *Query) GetQueryString() string
- func (*Query) ProtoMessage()
- func (x *Query) ProtoReflect() protoreflect.Message
- func (x *Query) Reset()
- func (x *Query) String() string
- type ResetReq
- func (*ResetReq) Descriptor() ([]byte, []int)deprecated
- func (x *ResetReq) GetNewpassword() string
- func (x *ResetReq) GetOldpassword() string
- func (x *ResetReq) GetUserID() uint32
- func (*ResetReq) ProtoMessage()
- func (x *ResetReq) ProtoReflect() protoreflect.Message
- func (x *ResetReq) Reset()
- func (x *ResetReq) String() string
- type ResetResp
- type SigninReq
- type SignoutReq
- type SignoutResp
- type SignupReq
- func (*SignupReq) Descriptor() ([]byte, []int)deprecated
- func (x *SignupReq) GetEmail() string
- func (x *SignupReq) GetPassword() string
- func (x *SignupReq) GetPhoneNumber() string
- func (x *SignupReq) GetRole() uint32
- func (x *SignupReq) GetUserName() string
- func (*SignupReq) ProtoMessage()
- func (x *SignupReq) ProtoReflect() protoreflect.Message
- func (x *SignupReq) Reset()
- func (x *SignupReq) String() string
- type SignupResp
- type TokenReq
- type UpdateReq
- func (*UpdateReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateReq) GetEmail() string
- func (x *UpdateReq) GetPhoneNumber() string
- func (x *UpdateReq) GetRole() uint32
- func (x *UpdateReq) GetRoutes() string
- func (x *UpdateReq) GetToken() string
- func (x *UpdateReq) GetUserID() uint32
- func (x *UpdateReq) GetUserName() string
- func (*UpdateReq) ProtoMessage()
- func (x *UpdateReq) ProtoReflect() protoreflect.Message
- func (x *UpdateReq) Reset()
- func (x *UpdateReq) String() string
- type UserHandler
- type UserResp
- func (*UserResp) Descriptor() ([]byte, []int)deprecated
- func (x *UserResp) GetEmail() string
- func (x *UserResp) GetPhoneNumber() string
- func (x *UserResp) GetRole() uint32
- func (x *UserResp) GetToken() string
- func (x *UserResp) GetUserID() uint32
- func (x *UserResp) GetUserName() string
- func (*UserResp) ProtoMessage()
- func (x *UserResp) ProtoReflect() protoreflect.Message
- func (x *UserResp) Reset()
- func (x *UserResp) String() string
- type UserService
- type UsersResp
- func (*UsersResp) Descriptor() ([]byte, []int)deprecated
- func (x *UsersResp) GetCurrpages() uint32
- func (x *UsersResp) GetTotalpages() uint32
- func (x *UsersResp) GetTotals() uint32
- func (x *UsersResp) GetUsers() []*UserResp
- func (*UsersResp) ProtoMessage()
- func (x *UsersResp) ProtoReflect() protoreflect.Message
- func (x *UsersResp) Reset()
- func (x *UsersResp) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_user_user_proto protoreflect.FileDescriptor
Functions ¶
func NewUserEndpoints ¶
func RegisterUserHandler ¶
func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
Types ¶
type ConfigReq ¶
type ConfigReq struct { Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` UserID uint32 `protobuf:"varint,2,opt,name=userID,proto3" json:"userID,omitempty"` Configs string `protobuf:"bytes,1,opt,name=configs,proto3" json:"configs,omitempty"` // contains filtered or unexported fields }
func (*ConfigReq) Descriptor
deprecated
func (*ConfigReq) GetConfigs ¶
func (*ConfigReq) ProtoMessage ¶
func (*ConfigReq) ProtoMessage()
func (*ConfigReq) ProtoReflect ¶
func (x *ConfigReq) ProtoReflect() protoreflect.Message
type ConfigResp ¶
type ConfigResp struct { Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` UserID uint32 `protobuf:"varint,2,opt,name=userID,proto3" json:"userID,omitempty"` Configs string `protobuf:"bytes,1,opt,name=configs,proto3" json:"configs,omitempty"` // contains filtered or unexported fields }
func (*ConfigResp) Descriptor
deprecated
func (*ConfigResp) Descriptor() ([]byte, []int)
Deprecated: Use ConfigResp.ProtoReflect.Descriptor instead.
func (*ConfigResp) GetConfigs ¶
func (x *ConfigResp) GetConfigs() string
func (*ConfigResp) GetId ¶
func (x *ConfigResp) GetId() uint32
func (*ConfigResp) GetUserID ¶
func (x *ConfigResp) GetUserID() uint32
func (*ConfigResp) ProtoMessage ¶
func (*ConfigResp) ProtoMessage()
func (*ConfigResp) ProtoReflect ¶
func (x *ConfigResp) ProtoReflect() protoreflect.Message
func (*ConfigResp) Reset ¶
func (x *ConfigResp) Reset()
func (*ConfigResp) String ¶
func (x *ConfigResp) String() string
type DeleteResp ¶
type DeleteResp struct {
// contains filtered or unexported fields
}
func (*DeleteResp) Descriptor
deprecated
func (*DeleteResp) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResp.ProtoReflect.Descriptor instead.
func (*DeleteResp) ProtoMessage ¶
func (*DeleteResp) ProtoMessage()
func (*DeleteResp) ProtoReflect ¶
func (x *DeleteResp) ProtoReflect() protoreflect.Message
func (*DeleteResp) Reset ¶
func (x *DeleteResp) Reset()
func (*DeleteResp) String ¶
func (x *DeleteResp) String() string
type IdReq ¶
type IdReq struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdReq) Descriptor
deprecated
func (*IdReq) ProtoMessage ¶
func (*IdReq) ProtoMessage()
func (*IdReq) ProtoReflect ¶
func (x *IdReq) ProtoReflect() protoreflect.Message
type InitializeReq ¶
type InitializeReq struct { UserName string `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` PhoneNumber string `protobuf:"bytes,3,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Routes string `protobuf:"bytes,7,opt,name=routes,proto3" json:"routes,omitempty"` // contains filtered or unexported fields }
func (*InitializeReq) Descriptor
deprecated
func (*InitializeReq) Descriptor() ([]byte, []int)
Deprecated: Use InitializeReq.ProtoReflect.Descriptor instead.
func (*InitializeReq) GetEmail ¶
func (x *InitializeReq) GetEmail() string
func (*InitializeReq) GetPassword ¶
func (x *InitializeReq) GetPassword() string
func (*InitializeReq) GetPhoneNumber ¶
func (x *InitializeReq) GetPhoneNumber() string
func (*InitializeReq) GetRoutes ¶
func (x *InitializeReq) GetRoutes() string
func (*InitializeReq) GetUserName ¶
func (x *InitializeReq) GetUserName() string
func (*InitializeReq) ProtoMessage ¶
func (*InitializeReq) ProtoMessage()
func (*InitializeReq) ProtoReflect ¶
func (x *InitializeReq) ProtoReflect() protoreflect.Message
func (*InitializeReq) Reset ¶
func (x *InitializeReq) Reset()
func (*InitializeReq) String ¶
func (x *InitializeReq) String() string
type InitializeResp ¶
type InitializeResp struct {
// contains filtered or unexported fields
}
func (*InitializeResp) Descriptor
deprecated
func (*InitializeResp) Descriptor() ([]byte, []int)
Deprecated: Use InitializeResp.ProtoReflect.Descriptor instead.
func (*InitializeResp) ProtoMessage ¶
func (*InitializeResp) ProtoMessage()
func (*InitializeResp) ProtoReflect ¶
func (x *InitializeResp) ProtoReflect() protoreflect.Message
func (*InitializeResp) Reset ¶
func (x *InitializeResp) Reset()
func (*InitializeResp) String ¶
func (x *InitializeResp) String() string
type InitializedResp ¶
type InitializedResp struct { Initialized bool `protobuf:"varint,1,opt,name=initialized,proto3" json:"initialized,omitempty"` // contains filtered or unexported fields }
func (*InitializedResp) Descriptor
deprecated
func (*InitializedResp) Descriptor() ([]byte, []int)
Deprecated: Use InitializedResp.ProtoReflect.Descriptor instead.
func (*InitializedResp) GetInitialized ¶
func (x *InitializedResp) GetInitialized() bool
func (*InitializedResp) ProtoMessage ¶
func (*InitializedResp) ProtoMessage()
func (*InitializedResp) ProtoReflect ¶
func (x *InitializedResp) ProtoReflect() protoreflect.Message
func (*InitializedResp) Reset ¶
func (x *InitializedResp) Reset()
func (*InitializedResp) String ¶
func (x *InitializedResp) String() string
type Nop ¶
type Nop struct {
// contains filtered or unexported fields
}
func (*Nop) Descriptor
deprecated
func (*Nop) ProtoMessage ¶
func (*Nop) ProtoMessage()
func (*Nop) ProtoReflect ¶
func (x *Nop) ProtoReflect() protoreflect.Message
type Parameter ¶
type Parameter struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Parameter) Descriptor
deprecated
func (*Parameter) ProtoMessage ¶
func (*Parameter) ProtoMessage()
func (*Parameter) ProtoReflect ¶
func (x *Parameter) ProtoReflect() protoreflect.Message
type Query ¶
type Query struct { Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Page uint32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` PerPage uint32 `protobuf:"varint,4,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"` QueryString string `protobuf:"bytes,5,opt,name=queryString,proto3" json:"queryString,omitempty"` QueryParams []*Parameter `protobuf:"bytes,6,rep,name=queryParams,proto3" json:"queryParams,omitempty"` // contains filtered or unexported fields }
func (*Query) Descriptor
deprecated
func (*Query) GetPerPage ¶
func (*Query) GetQueryParams ¶
func (*Query) GetQueryString ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) ProtoReflect ¶
func (x *Query) ProtoReflect() protoreflect.Message
type ResetReq ¶
type ResetReq struct { UserID uint32 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` Oldpassword string `protobuf:"bytes,2,opt,name=oldpassword,proto3" json:"oldpassword,omitempty"` Newpassword string `protobuf:"bytes,3,opt,name=newpassword,proto3" json:"newpassword,omitempty"` // contains filtered or unexported fields }
func (*ResetReq) Descriptor
deprecated
func (*ResetReq) GetNewpassword ¶
func (*ResetReq) GetOldpassword ¶
func (*ResetReq) ProtoMessage ¶
func (*ResetReq) ProtoMessage()
func (*ResetReq) ProtoReflect ¶
func (x *ResetReq) ProtoReflect() protoreflect.Message
type ResetResp ¶
type ResetResp struct {
// contains filtered or unexported fields
}
func (*ResetResp) Descriptor
deprecated
func (*ResetResp) ProtoMessage ¶
func (*ResetResp) ProtoMessage()
func (*ResetResp) ProtoReflect ¶
func (x *ResetResp) ProtoReflect() protoreflect.Message
type SigninReq ¶
type SigninReq struct { PhoneNumber string `protobuf:"bytes,1,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SigninReq) Descriptor
deprecated
func (*SigninReq) GetPassword ¶
func (*SigninReq) GetPhoneNumber ¶
func (*SigninReq) ProtoMessage ¶
func (*SigninReq) ProtoMessage()
func (*SigninReq) ProtoReflect ¶
func (x *SigninReq) ProtoReflect() protoreflect.Message
type SignoutReq ¶
type SignoutReq struct { UserID uint32 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*SignoutReq) Descriptor
deprecated
func (*SignoutReq) Descriptor() ([]byte, []int)
Deprecated: Use SignoutReq.ProtoReflect.Descriptor instead.
func (*SignoutReq) GetUserID ¶
func (x *SignoutReq) GetUserID() uint32
func (*SignoutReq) ProtoMessage ¶
func (*SignoutReq) ProtoMessage()
func (*SignoutReq) ProtoReflect ¶
func (x *SignoutReq) ProtoReflect() protoreflect.Message
func (*SignoutReq) Reset ¶
func (x *SignoutReq) Reset()
func (*SignoutReq) String ¶
func (x *SignoutReq) String() string
type SignoutResp ¶
type SignoutResp struct {
// contains filtered or unexported fields
}
func (*SignoutResp) Descriptor
deprecated
func (*SignoutResp) Descriptor() ([]byte, []int)
Deprecated: Use SignoutResp.ProtoReflect.Descriptor instead.
func (*SignoutResp) ProtoMessage ¶
func (*SignoutResp) ProtoMessage()
func (*SignoutResp) ProtoReflect ¶
func (x *SignoutResp) ProtoReflect() protoreflect.Message
func (*SignoutResp) Reset ¶
func (x *SignoutResp) Reset()
func (*SignoutResp) String ¶
func (x *SignoutResp) String() string
type SignupReq ¶
type SignupReq struct { PhoneNumber string `protobuf:"bytes,1,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,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"` Role uint32 `protobuf:"varint,5,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*SignupReq) Descriptor
deprecated
func (*SignupReq) GetPassword ¶
func (*SignupReq) GetPhoneNumber ¶
func (*SignupReq) GetUserName ¶
func (*SignupReq) ProtoMessage ¶
func (*SignupReq) ProtoMessage()
func (*SignupReq) ProtoReflect ¶
func (x *SignupReq) ProtoReflect() protoreflect.Message
type SignupResp ¶
type SignupResp struct {
// contains filtered or unexported fields
}
func (*SignupResp) Descriptor
deprecated
func (*SignupResp) Descriptor() ([]byte, []int)
Deprecated: Use SignupResp.ProtoReflect.Descriptor instead.
func (*SignupResp) ProtoMessage ¶
func (*SignupResp) ProtoMessage()
func (*SignupResp) ProtoReflect ¶
func (x *SignupResp) ProtoReflect() protoreflect.Message
func (*SignupResp) Reset ¶
func (x *SignupResp) Reset()
func (*SignupResp) String ¶
func (x *SignupResp) String() string
type TokenReq ¶
type TokenReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*TokenReq) Descriptor
deprecated
func (*TokenReq) ProtoMessage ¶
func (*TokenReq) ProtoMessage()
func (*TokenReq) ProtoReflect ¶
func (x *TokenReq) ProtoReflect() protoreflect.Message
type UpdateReq ¶
type UpdateReq struct { UserID uint32 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` PhoneNumber string `protobuf:"bytes,4,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"` Token string `protobuf:"bytes,5,opt,name=Token,proto3" json:"Token,omitempty"` Role uint32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` Routes string `protobuf:"bytes,7,opt,name=routes,proto3" json:"routes,omitempty"` // contains filtered or unexported fields }
func (*UpdateReq) Descriptor
deprecated
func (*UpdateReq) GetPhoneNumber ¶
func (*UpdateReq) GetUserName ¶
func (*UpdateReq) ProtoMessage ¶
func (*UpdateReq) ProtoMessage()
func (*UpdateReq) ProtoReflect ¶
func (x *UpdateReq) ProtoReflect() protoreflect.Message
type UserHandler ¶
type UserHandler interface { // 注册用户 Signup(context.Context, *SignupReq, *SignupResp) error // 用户登陆 Signin(context.Context, *SigninReq, *UserResp) error // 用户退出登陆 Signout(context.Context, *SignoutReq, *SignoutResp) error // 密码重置 Reset(context.Context, *ResetReq, *ResetResp) error // 修改用户信息 Update(context.Context, *UpdateReq, *UserResp) error // 根据token获取用户信息 GetUserByToken(context.Context, *TokenReq, *UserResp) error // 根据用户ID删除指定用户 DeleteUser(context.Context, *IdReq, *DeleteResp) error // 根据用户ID获取用户信息 GetUser(context.Context, *IdReq, *UserResp) error // 根据分页,条件查询等返回用户列表 GetUsers(context.Context, *Query, *UsersResp) error SaveConfig(context.Context, *ConfigReq, *ConfigResp) error DeleteConfig(context.Context, *ConfigReq, *ConfigResp) error GetConfig(context.Context, *ConfigReq, *ConfigResp) error Initialized(context.Context, *Nop, *InitializedResp) error Initialize(context.Context, *InitializeReq, *InitializeResp) error }
type UserResp ¶
type UserResp struct { UserID uint32 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` PhoneNumber string `protobuf:"bytes,4,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"` Token string `protobuf:"bytes,5,opt,name=Token,proto3" json:"Token,omitempty"` Role uint32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` // string routes = 7; // contains filtered or unexported fields }
func (*UserResp) Descriptor
deprecated
func (*UserResp) GetPhoneNumber ¶
func (*UserResp) GetUserName ¶
func (*UserResp) ProtoMessage ¶
func (*UserResp) ProtoMessage()
func (*UserResp) ProtoReflect ¶
func (x *UserResp) ProtoReflect() protoreflect.Message
type UserService ¶
type UserService interface { // 注册用户 Signup(ctx context.Context, in *SignupReq, opts ...client.CallOption) (*SignupResp, error) // 用户登陆 Signin(ctx context.Context, in *SigninReq, opts ...client.CallOption) (*UserResp, error) // 用户退出登陆 Signout(ctx context.Context, in *SignoutReq, opts ...client.CallOption) (*SignoutResp, error) // 密码重置 Reset(ctx context.Context, in *ResetReq, opts ...client.CallOption) (*ResetResp, error) // 修改用户信息 Update(ctx context.Context, in *UpdateReq, opts ...client.CallOption) (*UserResp, error) // 根据token获取用户信息 GetUserByToken(ctx context.Context, in *TokenReq, opts ...client.CallOption) (*UserResp, error) // 根据用户ID删除指定用户 DeleteUser(ctx context.Context, in *IdReq, opts ...client.CallOption) (*DeleteResp, error) // 根据用户ID获取用户信息 GetUser(ctx context.Context, in *IdReq, opts ...client.CallOption) (*UserResp, error) // 根据分页,条件查询等返回用户列表 GetUsers(ctx context.Context, in *Query, opts ...client.CallOption) (*UsersResp, error) SaveConfig(ctx context.Context, in *ConfigReq, opts ...client.CallOption) (*ConfigResp, error) DeleteConfig(ctx context.Context, in *ConfigReq, opts ...client.CallOption) (*ConfigResp, error) GetConfig(ctx context.Context, in *ConfigReq, opts ...client.CallOption) (*ConfigResp, error) Initialized(ctx context.Context, in *Nop, opts ...client.CallOption) (*InitializedResp, error) Initialize(ctx context.Context, in *InitializeReq, opts ...client.CallOption) (*InitializeResp, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
type UsersResp ¶
type UsersResp struct { Users []*UserResp `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` Totalpages uint32 `protobuf:"varint,2,opt,name=totalpages,proto3" json:"totalpages,omitempty"` Currpages uint32 `protobuf:"varint,3,opt,name=currpages,proto3" json:"currpages,omitempty"` Totals uint32 `protobuf:"varint,4,opt,name=totals,proto3" json:"totals,omitempty"` // contains filtered or unexported fields }
func (*UsersResp) Descriptor
deprecated
func (*UsersResp) GetCurrpages ¶
func (*UsersResp) GetTotalpages ¶
func (*UsersResp) ProtoMessage ¶
func (*UsersResp) ProtoMessage()
func (*UsersResp) ProtoReflect ¶
func (x *UsersResp) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.