Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultDeleteSysUser(ctx context.Context, in *SysUser, db *gorm.DB) error
- func DefaultDeleteSysUserSet(ctx context.Context, in []*SysUser, db *gorm.DB) error
- func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type ForceLogoutReq
- func (*ForceLogoutReq) Descriptor() ([]byte, []int)deprecated
- func (x *ForceLogoutReq) GetPlatformID() int32
- func (x *ForceLogoutReq) GetUserID() string
- func (*ForceLogoutReq) ProtoMessage()
- func (x *ForceLogoutReq) ProtoReflect() protoreflect.Message
- func (x *ForceLogoutReq) Reset()
- func (x *ForceLogoutReq) String() string
- type ForceLogoutResp
- type GetUserTokenReq
- func (*GetUserTokenReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserTokenReq) GetPlatformID() int32
- func (x *GetUserTokenReq) GetUserID() string
- func (*GetUserTokenReq) ProtoMessage()
- func (x *GetUserTokenReq) ProtoReflect() protoreflect.Message
- func (x *GetUserTokenReq) Reset()
- func (x *GetUserTokenReq) String() string
- type GetUserTokenResp
- func (*GetUserTokenResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserTokenResp) GetExpireTimeSeconds() int64
- func (x *GetUserTokenResp) GetToken() string
- func (*GetUserTokenResp) ProtoMessage()
- func (x *GetUserTokenResp) ProtoReflect() protoreflect.Message
- func (x *GetUserTokenResp) Reset()
- func (x *GetUserTokenResp) String() string
- type ListUser
- type ParseTokenReq
- type ParseTokenResp
- func (*ParseTokenResp) Descriptor() ([]byte, []int)deprecated
- func (x *ParseTokenResp) GetExpireTimeSeconds() int64
- func (x *ParseTokenResp) GetPlatform() string
- func (x *ParseTokenResp) GetUserID() string
- func (*ParseTokenResp) ProtoMessage()
- func (x *ParseTokenResp) ProtoReflect() protoreflect.Message
- func (x *ParseTokenResp) Reset()
- func (x *ParseTokenResp) String() string
- type SysUser
- func DefaultApplyFieldMaskSysUser(ctx context.Context, patchee *SysUser, patcher *SysUser, ...) (*SysUser, error)
- func DefaultCreateSysUser(ctx context.Context, in *SysUser, db *gorm.DB) (*SysUser, error)
- func DefaultListSysUser(ctx context.Context, db *gorm.DB) ([]*SysUser, error)
- func DefaultPatchSetSysUser(ctx context.Context, objects []*SysUser, updateMasks []*field_mask.FieldMask, ...) ([]*SysUser, error)
- func DefaultPatchSysUser(ctx context.Context, in *SysUser, updateMask *field_mask.FieldMask, ...) (*SysUser, error)
- func DefaultReadSysUser(ctx context.Context, in *SysUser, db *gorm.DB) (*SysUser, error)
- func DefaultStrictUpdateSysUser(ctx context.Context, in *SysUser, db *gorm.DB) (*SysUser, error)
- func (m *SysUser) AfterToORM(ctx context.Context, orm *SysUserORM) error
- func (*SysUser) Descriptor() ([]byte, []int)deprecated
- func (x *SysUser) GetAccess() string
- func (x *SysUser) GetAvatar() string
- func (x *SysUser) GetChildren() []*SysUser
- func (x *SysUser) GetCountry() string
- func (x *SysUser) GetGroup() string
- func (x *SysUser) GetId() int32
- func (x *SysUser) GetNickName() string
- func (x *SysUser) GetNotifyCount() string
- func (x *SysUser) GetOrganization() *organization.SysOrganization
- func (x *SysUser) GetParentId() int32
- func (x *SysUser) GetPassword() string
- func (x *SysUser) GetPermissions() []string
- func (x *SysUser) GetRole() []*role.SysRole
- func (x *SysUser) GetRoles() []string
- func (x *SysUser) GetTags() string
- func (x *SysUser) GetTitle() string
- func (x *SysUser) GetUnreadCount() string
- func (x *SysUser) GetUsername() string
- func (*SysUser) ProtoMessage()
- func (x *SysUser) ProtoReflect() protoreflect.Message
- func (x *SysUser) Reset()
- func (x *SysUser) String() string
- func (m *SysUser) ToORM(ctx context.Context) (SysUserORM, error)
- type SysUserORM
- type SysUserORMWithAfterCreate_
- type SysUserORMWithAfterDeleteSet
- type SysUserORMWithAfterDelete_
- type SysUserORMWithAfterListFind
- type SysUserORMWithAfterReadFind
- type SysUserORMWithAfterStrictUpdateSave
- type SysUserORMWithBeforeCreate_
- type SysUserORMWithBeforeDeleteSet
- type SysUserORMWithBeforeDelete_
- type SysUserORMWithBeforeListApplyQuery
- type SysUserORMWithBeforeListFind
- type SysUserORMWithBeforeReadApplyQuery
- type SysUserORMWithBeforeReadFind
- type SysUserORMWithBeforeStrictUpdateCleanup
- type SysUserORMWithBeforeStrictUpdateSave
- type SysUserWithAfterPatchSave
- type SysUserWithAfterToORM
- type SysUserWithAfterToPB
- type SysUserWithBeforePatchApplyFieldMask
- type SysUserWithBeforePatchRead
- type SysUserWithBeforePatchSave
- type SysUserWithBeforeToORM
- type SysUserWithBeforeToPB
- type UnimplementedUserServer
- func (UnimplementedUserServer) GetUserInfo(context.Context, *UserInfoReq) (*SysUser, error)
- func (UnimplementedUserServer) GetUserScope(context.Context, *SysUser) (*UserScopeResp, error)
- func (UnimplementedUserServer) ListSysUser(context.Context, *emptypb.Empty) (*ListUser, error)
- func (UnimplementedUserServer) SysUserCreate(context.Context, *UserCreateReq) (*SysUser, error)
- type UnsafeUserServer
- type UserClient
- type UserCreateReq
- func (*UserCreateReq) Descriptor() ([]byte, []int)deprecated
- func (x *UserCreateReq) GetGender() int32
- func (x *UserCreateReq) GetNickname() string
- func (x *UserCreateReq) GetOrganizationId() int32
- func (x *UserCreateReq) GetPassword() string
- func (x *UserCreateReq) GetRoleCodes() []string
- func (x *UserCreateReq) GetStatus() int32
- func (x *UserCreateReq) GetUsername() string
- func (*UserCreateReq) ProtoMessage()
- func (x *UserCreateReq) ProtoReflect() protoreflect.Message
- func (x *UserCreateReq) Reset()
- func (x *UserCreateReq) String() string
- type UserDefaultServer
- type UserHTTPClient
- type UserHTTPClientImpl
- func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...http.CallOption) (*SysUser, error)
- func (c *UserHTTPClientImpl) GetUserScope(ctx context.Context, in *SysUser, opts ...http.CallOption) (*UserScopeResp, error)
- func (c *UserHTTPClientImpl) ListSysUser(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*ListUser, error)
- func (c *UserHTTPClientImpl) SysUserCreate(ctx context.Context, in *UserCreateReq, opts ...http.CallOption) (*SysUser, error)
- type UserHTTPServer
- type UserImpl
- func (c *UserImpl) GetUserInfo(ctx context.Context, in *UserInfoReq) (*SysUser, error)
- func (c *UserImpl) GetUserScope(ctx context.Context, in *SysUser) (*UserScopeResp, error)
- func (c *UserImpl) ListSysUser(ctx context.Context, in *emptypb.Empty) (*ListUser, error)
- func (c *UserImpl) SysUserCreate(ctx context.Context, in *UserCreateReq) (*SysUser, error)
- type UserInfoReq
- func (*UserInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoReq) GetPlatformID() int32
- func (x *UserInfoReq) GetSecret() string
- func (x *UserInfoReq) GetUserID() string
- func (*UserInfoReq) ProtoMessage()
- func (x *UserInfoReq) ProtoReflect() protoreflect.Message
- func (x *UserInfoReq) Reset()
- func (x *UserInfoReq) String() string
- type UserScopeResp
- func (*UserScopeResp) Descriptor() ([]byte, []int)deprecated
- func (x *UserScopeResp) GetRoles() []string
- func (x *UserScopeResp) GetUesrname() string
- func (x *UserScopeResp) GetUserId() int32
- func (*UserScopeResp) ProtoMessage()
- func (x *UserScopeResp) ProtoReflect() protoreflect.Message
- func (x *UserScopeResp) Reset()
- func (x *UserScopeResp) String() string
- type UserServer
- type UserSysUserWithAfterListSysUser
- type UserSysUserWithBeforeListSysUser
Constants ¶
const ( User_GetUserInfo_FullMethodName = "/atreus.user.User/getUserInfo" User_SysUserCreate_FullMethodName = "/atreus.user.User/SysUserCreate" User_ListSysUser_FullMethodName = "/atreus.user.User/ListSysUser" User_GetUserScope_FullMethodName = "/atreus.user.User/GetUserScope" )
const OperationUserGetUserScope = "/atreus.user.User/GetUserScope"
const OperationUserListSysUser = "/atreus.user.User/ListSysUser"
const OperationUserSysUserCreate = "/atreus.user.User/SysUserCreate"
const OperationUsergetUserInfo = "/atreus.user.User/getUserInfo"
Variables ¶
var File_api_user_user_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "atreus.user.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "getUserInfo", Handler: _User_GetUserInfo_Handler, }, { MethodName: "SysUserCreate", Handler: _User_SysUserCreate_Handler, }, { MethodName: "ListSysUser", Handler: _User_ListSysUser_Handler, }, { MethodName: "GetUserScope", Handler: _User_GetUserScope_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/user/user.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func DefaultDeleteSysUser ¶
func DefaultDeleteSysUserSet ¶
func RegisterUserHTTPServer ¶
func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type ForceLogoutReq ¶
type ForceLogoutReq struct { PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*ForceLogoutReq) Descriptor
deprecated
func (*ForceLogoutReq) Descriptor() ([]byte, []int)
Deprecated: Use ForceLogoutReq.ProtoReflect.Descriptor instead.
func (*ForceLogoutReq) GetPlatformID ¶
func (x *ForceLogoutReq) GetPlatformID() int32
func (*ForceLogoutReq) GetUserID ¶
func (x *ForceLogoutReq) GetUserID() string
func (*ForceLogoutReq) ProtoMessage ¶
func (*ForceLogoutReq) ProtoMessage()
func (*ForceLogoutReq) ProtoReflect ¶
func (x *ForceLogoutReq) ProtoReflect() protoreflect.Message
func (*ForceLogoutReq) Reset ¶
func (x *ForceLogoutReq) Reset()
func (*ForceLogoutReq) String ¶
func (x *ForceLogoutReq) String() string
type ForceLogoutResp ¶
type ForceLogoutResp struct {
// contains filtered or unexported fields
}
func (*ForceLogoutResp) Descriptor
deprecated
func (*ForceLogoutResp) Descriptor() ([]byte, []int)
Deprecated: Use ForceLogoutResp.ProtoReflect.Descriptor instead.
func (*ForceLogoutResp) ProtoMessage ¶
func (*ForceLogoutResp) ProtoMessage()
func (*ForceLogoutResp) ProtoReflect ¶
func (x *ForceLogoutResp) ProtoReflect() protoreflect.Message
func (*ForceLogoutResp) Reset ¶
func (x *ForceLogoutResp) Reset()
func (*ForceLogoutResp) String ¶
func (x *ForceLogoutResp) String() string
type GetUserTokenReq ¶
type GetUserTokenReq struct { PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*GetUserTokenReq) Descriptor
deprecated
func (*GetUserTokenReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserTokenReq.ProtoReflect.Descriptor instead.
func (*GetUserTokenReq) GetPlatformID ¶
func (x *GetUserTokenReq) GetPlatformID() int32
func (*GetUserTokenReq) GetUserID ¶
func (x *GetUserTokenReq) GetUserID() string
func (*GetUserTokenReq) ProtoMessage ¶
func (*GetUserTokenReq) ProtoMessage()
func (*GetUserTokenReq) ProtoReflect ¶
func (x *GetUserTokenReq) ProtoReflect() protoreflect.Message
func (*GetUserTokenReq) Reset ¶
func (x *GetUserTokenReq) Reset()
func (*GetUserTokenReq) String ¶
func (x *GetUserTokenReq) String() string
type GetUserTokenResp ¶
type GetUserTokenResp struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` ExpireTimeSeconds int64 `protobuf:"varint,2,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds,omitempty"` // contains filtered or unexported fields }
func (*GetUserTokenResp) Descriptor
deprecated
func (*GetUserTokenResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserTokenResp.ProtoReflect.Descriptor instead.
func (*GetUserTokenResp) GetExpireTimeSeconds ¶
func (x *GetUserTokenResp) GetExpireTimeSeconds() int64
func (*GetUserTokenResp) GetToken ¶
func (x *GetUserTokenResp) GetToken() string
func (*GetUserTokenResp) ProtoMessage ¶
func (*GetUserTokenResp) ProtoMessage()
func (*GetUserTokenResp) ProtoReflect ¶
func (x *GetUserTokenResp) ProtoReflect() protoreflect.Message
func (*GetUserTokenResp) Reset ¶
func (x *GetUserTokenResp) Reset()
func (*GetUserTokenResp) String ¶
func (x *GetUserTokenResp) String() string
type ListUser ¶
type ListUser struct { // Note repeated field and plural name 'results' Results []*SysUser `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` PageInfo *core.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` // contains filtered or unexported fields }
func (*ListUser) Descriptor
deprecated
func (*ListUser) GetPageInfo ¶
func (*ListUser) GetResults ¶
func (*ListUser) ProtoMessage ¶
func (*ListUser) ProtoMessage()
func (*ListUser) ProtoReflect ¶
func (x *ListUser) ProtoReflect() protoreflect.Message
type ParseTokenReq ¶
type ParseTokenReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*ParseTokenReq) Descriptor
deprecated
func (*ParseTokenReq) Descriptor() ([]byte, []int)
Deprecated: Use ParseTokenReq.ProtoReflect.Descriptor instead.
func (*ParseTokenReq) GetToken ¶
func (x *ParseTokenReq) GetToken() string
func (*ParseTokenReq) ProtoMessage ¶
func (*ParseTokenReq) ProtoMessage()
func (*ParseTokenReq) ProtoReflect ¶
func (x *ParseTokenReq) ProtoReflect() protoreflect.Message
func (*ParseTokenReq) Reset ¶
func (x *ParseTokenReq) Reset()
func (*ParseTokenReq) String ¶
func (x *ParseTokenReq) String() string
type ParseTokenResp ¶
type ParseTokenResp struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` ExpireTimeSeconds int64 `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds,omitempty"` // contains filtered or unexported fields }
func (*ParseTokenResp) Descriptor
deprecated
func (*ParseTokenResp) Descriptor() ([]byte, []int)
Deprecated: Use ParseTokenResp.ProtoReflect.Descriptor instead.
func (*ParseTokenResp) GetExpireTimeSeconds ¶
func (x *ParseTokenResp) GetExpireTimeSeconds() int64
func (*ParseTokenResp) GetPlatform ¶
func (x *ParseTokenResp) GetPlatform() string
func (*ParseTokenResp) GetUserID ¶
func (x *ParseTokenResp) GetUserID() string
func (*ParseTokenResp) ProtoMessage ¶
func (*ParseTokenResp) ProtoMessage()
func (*ParseTokenResp) ProtoReflect ¶
func (x *ParseTokenResp) ProtoReflect() protoreflect.Message
func (*ParseTokenResp) Reset ¶
func (x *ParseTokenResp) Reset()
func (*ParseTokenResp) String ¶
func (x *ParseTokenResp) String() string
type SysUser ¶
type SysUser struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` Children []*SysUser `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` ParentId int32 `protobuf:"varint,6,opt,name=parentId,proto3" json:"parentId,omitempty"` Avatar string `protobuf:"bytes,14,opt,name=avatar,proto3" json:"avatar,omitempty"` Title string `protobuf:"bytes,7,opt,name=title,proto3" json:"title,omitempty"` Group string `protobuf:"bytes,8,opt,name=group,proto3" json:"group,omitempty"` Tags string `protobuf:"bytes,9,opt,name=tags,proto3" json:"tags,omitempty"` NotifyCount string `protobuf:"bytes,10,opt,name=notifyCount,proto3" json:"notifyCount,omitempty"` UnreadCount string `protobuf:"bytes,11,opt,name=unreadCount,proto3" json:"unreadCount,omitempty"` Country string `protobuf:"bytes,12,opt,name=country,proto3" json:"country,omitempty"` Access string `protobuf:"bytes,13,opt,name=access,proto3" json:"access,omitempty"` Permissions []string `protobuf:"bytes,15,rep,name=permissions,proto3" json:"permissions,omitempty"` Roles []string `protobuf:"bytes,16,rep,name=roles,proto3" json:"roles,omitempty"` Role []*role.SysRole `protobuf:"bytes,17,rep,name=role,proto3" json:"role,omitempty"` Organization *organization.SysOrganization `protobuf:"bytes,18,opt,name=organization,proto3" json:"organization,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskSysUser ¶
func DefaultApplyFieldMaskSysUser(ctx context.Context, patchee *SysUser, patcher *SysUser, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*SysUser, error)
DefaultApplyFieldMaskSysUser patches an pbObject with patcher according to a field mask.
func DefaultCreateSysUser ¶
DefaultCreateSysUser executes a basic gorm create call
func DefaultListSysUser ¶
DefaultListSysUser executes a gorm list call
func DefaultPatchSetSysUser ¶
func DefaultPatchSetSysUser(ctx context.Context, objects []*SysUser, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*SysUser, error)
DefaultPatchSetSysUser executes a bulk gorm update call with patch behavior
func DefaultPatchSysUser ¶
func DefaultPatchSysUser(ctx context.Context, in *SysUser, updateMask *field_mask.FieldMask, db *gorm.DB) (*SysUser, error)
DefaultPatchSysUser executes a basic gorm update call with patch behavior
func DefaultReadSysUser ¶
func DefaultStrictUpdateSysUser ¶
DefaultStrictUpdateSysUser clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*SysUser) AfterToORM ¶
func (m *SysUser) AfterToORM(ctx context.Context, orm *SysUserORM) error
func (*SysUser) Descriptor
deprecated
func (*SysUser) GetChildren ¶
func (*SysUser) GetCountry ¶
func (*SysUser) GetNickName ¶
func (*SysUser) GetNotifyCount ¶
func (*SysUser) GetOrganization ¶
func (x *SysUser) GetOrganization() *organization.SysOrganization
func (*SysUser) GetParentId ¶
func (*SysUser) GetPassword ¶
func (*SysUser) GetPermissions ¶
func (*SysUser) GetUnreadCount ¶
func (*SysUser) GetUsername ¶
func (*SysUser) ProtoMessage ¶
func (*SysUser) ProtoMessage()
func (*SysUser) ProtoReflect ¶
func (x *SysUser) ProtoReflect() protoreflect.Message
type SysUserORM ¶
type SysUserORM struct { Access string Avatar string Country string Group string Id int32 `gorm:"type:integer;primaryKey;autoIncrement"` NickName string NotifyCount string Organization *organization.SysOrganizationORM `gorm:"foreignKey:SysOrganizationId;references:Id"` ParentId int32 Password string Role []*role.SysRoleORM `gorm:"foreignKey:Id;references:Id;many2many:sys_user_role;joinForeignKey:SysUserId;joinReferences:SysRoleId"` SysOrganizationId *int32 Tags string Title string UnreadCount string Username string `gorm:"unique"` }
func (*SysUserORM) AfterToPB ¶
func (m *SysUserORM) AfterToPB(ctx context.Context, user *SysUser) error
AfterToPB implements the posthook interface for the User type. This allows us to customize conversion behavior. In this example, we set the User's Age based on the Birthday, instead of storing it separately in the DB
func (*SysUserORM) BeforeCreate_ ¶
func (m *SysUserORM) BeforeCreate_(ctx context.Context, db *gorm.DB, orm SysUserORM) (SysUserORM, *gorm.DB, error)
func (SysUserORM) TableName ¶
func (SysUserORM) TableName() string
TableName overrides the default tablename generated by GORM
type SysUserORMWithBeforeCreate_ ¶
type SysUserORMWithBeforeCreate_ interface {
BeforeCreate_(context.Context, *gorm.DB, SysUserORM) (SysUserORM, *gorm.DB, error)
}
type SysUserORMWithBeforeDelete_ ¶
type SysUserORMWithBeforeDelete_ interface {
BeforeDelete_(context.Context, *gorm.DB, SysUserORM) (SysUserORM, *gorm.DB, error)
}
type SysUserORMWithBeforeStrictUpdateCleanup ¶
type SysUserORMWithBeforeStrictUpdateCleanup interface {
BeforeStrictUpdateCleanup(context.Context, *gorm.DB, SysUserORM) (SysUserORM, *gorm.DB, error)
}
type SysUserORMWithBeforeStrictUpdateSave ¶
type SysUserORMWithBeforeStrictUpdateSave interface {
BeforeStrictUpdateSave(context.Context, *gorm.DB, SysUserORM) (SysUserORM, *gorm.DB, error)
}
type SysUserWithAfterToORM ¶
type SysUserWithAfterToORM interface {
AfterToORM(context.Context, *SysUserORM) error
}
SysUserAfterToORM called after default ToORM code
type SysUserWithAfterToPB ¶
SysUserAfterToPB called after default ToPB code
type SysUserWithBeforeToORM ¶
type SysUserWithBeforeToORM interface {
BeforeToORM(context.Context, *SysUserORM) error
}
SysUserBeforeToORM called before default ToORM code
type SysUserWithBeforeToPB ¶
SysUserBeforeToPB called before default ToPB code
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServer) GetUserInfo ¶
func (UnimplementedUserServer) GetUserInfo(context.Context, *UserInfoReq) (*SysUser, error)
func (UnimplementedUserServer) GetUserScope ¶
func (UnimplementedUserServer) GetUserScope(context.Context, *SysUser) (*UserScopeResp, error)
func (UnimplementedUserServer) ListSysUser ¶
func (UnimplementedUserServer) SysUserCreate ¶
func (UnimplementedUserServer) SysUserCreate(context.Context, *UserCreateReq) (*SysUser, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface { // 获取用户信息 GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*SysUser, error) SysUserCreate(ctx context.Context, in *UserCreateReq, opts ...grpc.CallOption) (*SysUser, error) ListSysUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListUser, error) GetUserScope(ctx context.Context, in *SysUser, opts ...grpc.CallOption) (*UserScopeResp, error) }
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserCreateReq ¶
type UserCreateReq struct { Gender int32 `protobuf:"varint,1,opt,name=gender,proto3" json:"gender,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"nickname,omitempty"` OrganizationId int32 `protobuf:"varint,3,opt,name=organizationId,proto3" json:"organizationId,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` RoleCodes []string `protobuf:"bytes,5,rep,name=roleCodes,proto3" json:"roleCodes,omitempty"` Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*UserCreateReq) Descriptor
deprecated
func (*UserCreateReq) Descriptor() ([]byte, []int)
Deprecated: Use UserCreateReq.ProtoReflect.Descriptor instead.
func (*UserCreateReq) GetGender ¶
func (x *UserCreateReq) GetGender() int32
func (*UserCreateReq) GetNickname ¶
func (x *UserCreateReq) GetNickname() string
func (*UserCreateReq) GetOrganizationId ¶
func (x *UserCreateReq) GetOrganizationId() int32
func (*UserCreateReq) GetPassword ¶
func (x *UserCreateReq) GetPassword() string
func (*UserCreateReq) GetRoleCodes ¶
func (x *UserCreateReq) GetRoleCodes() []string
func (*UserCreateReq) GetStatus ¶
func (x *UserCreateReq) GetStatus() int32
func (*UserCreateReq) GetUsername ¶
func (x *UserCreateReq) GetUsername() string
func (*UserCreateReq) ProtoMessage ¶
func (*UserCreateReq) ProtoMessage()
func (*UserCreateReq) ProtoReflect ¶
func (x *UserCreateReq) ProtoReflect() protoreflect.Message
func (*UserCreateReq) Reset ¶
func (x *UserCreateReq) Reset()
func (*UserCreateReq) String ¶
func (x *UserCreateReq) String() string
type UserDefaultServer ¶
func (*UserDefaultServer) ListSysUser ¶
ListSysUser ...
type UserHTTPClient ¶
type UserHTTPClient interface { GetUserInfo(ctx context.Context, req *UserInfoReq, opts ...http.CallOption) (rsp *SysUser, err error) GetUserScope(ctx context.Context, req *SysUser, opts ...http.CallOption) (rsp *UserScopeResp, err error) ListSysUser(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *ListUser, err error) SysUserCreate(ctx context.Context, req *UserCreateReq, opts ...http.CallOption) (rsp *SysUser, err error) }
func NewUserHTTPClient ¶
func NewUserHTTPClient(client *http.Client) UserHTTPClient
type UserHTTPClientImpl ¶
type UserHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserHTTPClientImpl) GetUserInfo ¶
func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...http.CallOption) (*SysUser, error)
func (*UserHTTPClientImpl) GetUserScope ¶
func (c *UserHTTPClientImpl) GetUserScope(ctx context.Context, in *SysUser, opts ...http.CallOption) (*UserScopeResp, error)
func (*UserHTTPClientImpl) ListSysUser ¶
func (c *UserHTTPClientImpl) ListSysUser(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*ListUser, error)
func (*UserHTTPClientImpl) SysUserCreate ¶
func (c *UserHTTPClientImpl) SysUserCreate(ctx context.Context, in *UserCreateReq, opts ...http.CallOption) (*SysUser, error)
type UserHTTPServer ¶
type UserHTTPServer interface { // GetUserInfo获取用户信息 GetUserInfo(context.Context, *UserInfoReq) (*SysUser, error) GetUserScope(context.Context, *SysUser) (*UserScopeResp, error) ListSysUser(context.Context, *emptypb.Empty) (*ListUser, error) SysUserCreate(context.Context, *UserCreateReq) (*SysUser, error) }
type UserImpl ¶
type UserImpl struct {
// contains filtered or unexported fields
}
func NewUserImpl ¶
func NewUserImpl(conn *grpc.ClientConn) *UserImpl
func (*UserImpl) GetUserInfo ¶
func (*UserImpl) GetUserScope ¶
func (*UserImpl) ListSysUser ¶
func (*UserImpl) SysUserCreate ¶
type UserInfoReq ¶
type UserInfoReq struct { Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID,omitempty"` UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*UserInfoReq) Descriptor
deprecated
func (*UserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoReq.ProtoReflect.Descriptor instead.
func (*UserInfoReq) GetPlatformID ¶
func (x *UserInfoReq) GetPlatformID() int32
func (*UserInfoReq) GetSecret ¶
func (x *UserInfoReq) GetSecret() string
func (*UserInfoReq) GetUserID ¶
func (x *UserInfoReq) GetUserID() string
func (*UserInfoReq) ProtoMessage ¶
func (*UserInfoReq) ProtoMessage()
func (*UserInfoReq) ProtoReflect ¶
func (x *UserInfoReq) ProtoReflect() protoreflect.Message
func (*UserInfoReq) Reset ¶
func (x *UserInfoReq) Reset()
func (*UserInfoReq) String ¶
func (x *UserInfoReq) String() string
type UserScopeResp ¶
type UserScopeResp struct { UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` Uesrname string `protobuf:"bytes,2,opt,name=uesrname,proto3" json:"uesrname,omitempty"` Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*UserScopeResp) Descriptor
deprecated
func (*UserScopeResp) Descriptor() ([]byte, []int)
Deprecated: Use UserScopeResp.ProtoReflect.Descriptor instead.
func (*UserScopeResp) GetRoles ¶
func (x *UserScopeResp) GetRoles() []string
func (*UserScopeResp) GetUesrname ¶
func (x *UserScopeResp) GetUesrname() string
func (*UserScopeResp) GetUserId ¶
func (x *UserScopeResp) GetUserId() int32
func (*UserScopeResp) ProtoMessage ¶
func (*UserScopeResp) ProtoMessage()
func (*UserScopeResp) ProtoReflect ¶
func (x *UserScopeResp) ProtoReflect() protoreflect.Message
func (*UserScopeResp) Reset ¶
func (x *UserScopeResp) Reset()
func (*UserScopeResp) String ¶
func (x *UserScopeResp) String() string
type UserServer ¶
type UserServer interface { // 获取用户信息 GetUserInfo(context.Context, *UserInfoReq) (*SysUser, error) SysUserCreate(context.Context, *UserCreateReq) (*SysUser, error) ListSysUser(context.Context, *emptypb.Empty) (*ListUser, error) GetUserScope(context.Context, *SysUser) (*UserScopeResp, error) }
UserServer is the server API for User service. All implementations should embed UnimplementedUserServer for forward compatibility