user

package
v0.0.0-...-c6647e5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const OperationUserGetUserScope = "/atreus.user.User/GetUserScope"
View Source
const OperationUserListSysUser = "/atreus.user.User/ListSysUser"
View Source
const OperationUserSysUserCreate = "/atreus.user.User/SysUserCreate"
View Source
const OperationUsergetUserInfo = "/atreus.user.User/getUserInfo"

Variables

View Source
var File_api_user_user_proto protoreflect.FileDescriptor
View Source
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 DefaultDeleteSysUser(ctx context.Context, in *SysUser, db *gorm.DB) error

func DefaultDeleteSysUserSet

func DefaultDeleteSysUserSet(ctx context.Context, in []*SysUser, db *gorm.DB) error

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) Descriptor() ([]byte, []int)

Deprecated: Use ListUser.ProtoReflect.Descriptor instead.

func (*ListUser) GetPageInfo

func (x *ListUser) GetPageInfo() *core.PageInfo

func (*ListUser) GetResults

func (x *ListUser) GetResults() []*SysUser

func (*ListUser) ProtoMessage

func (*ListUser) ProtoMessage()

func (*ListUser) ProtoReflect

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

func (*ListUser) Reset

func (x *ListUser) Reset()

func (*ListUser) String

func (x *ListUser) String() string

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

func DefaultCreateSysUser(ctx context.Context, in *SysUser, db *gorm.DB) (*SysUser, error)

DefaultCreateSysUser executes a basic gorm create call

func DefaultListSysUser

func DefaultListSysUser(ctx context.Context, db *gorm.DB) ([]*SysUser, error)

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 DefaultReadSysUser(ctx context.Context, in *SysUser, db *gorm.DB) (*SysUser, error)

func DefaultStrictUpdateSysUser

func DefaultStrictUpdateSysUser(ctx context.Context, in *SysUser, db *gorm.DB) (*SysUser, error)

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) Descriptor() ([]byte, []int)

Deprecated: Use SysUser.ProtoReflect.Descriptor instead.

func (*SysUser) GetAccess

func (x *SysUser) GetAccess() string

func (*SysUser) GetAvatar

func (x *SysUser) GetAvatar() string

func (*SysUser) GetChildren

func (x *SysUser) GetChildren() []*SysUser

func (*SysUser) GetCountry

func (x *SysUser) GetCountry() string

func (*SysUser) GetGroup

func (x *SysUser) GetGroup() string

func (*SysUser) GetId

func (x *SysUser) GetId() int32

func (*SysUser) GetNickName

func (x *SysUser) GetNickName() string

func (*SysUser) GetNotifyCount

func (x *SysUser) GetNotifyCount() string

func (*SysUser) GetOrganization

func (x *SysUser) GetOrganization() *organization.SysOrganization

func (*SysUser) GetParentId

func (x *SysUser) GetParentId() int32

func (*SysUser) GetPassword

func (x *SysUser) GetPassword() string

func (*SysUser) GetPermissions

func (x *SysUser) GetPermissions() []string

func (*SysUser) GetRole

func (x *SysUser) GetRole() []*role.SysRole

func (*SysUser) GetRoles

func (x *SysUser) GetRoles() []string

func (*SysUser) GetTags

func (x *SysUser) GetTags() string

func (*SysUser) GetTitle

func (x *SysUser) GetTitle() string

func (*SysUser) GetUnreadCount

func (x *SysUser) GetUnreadCount() string

func (*SysUser) GetUsername

func (x *SysUser) GetUsername() string

func (*SysUser) ProtoMessage

func (*SysUser) ProtoMessage()

func (*SysUser) ProtoReflect

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

func (*SysUser) Reset

func (x *SysUser) Reset()

func (*SysUser) String

func (x *SysUser) String() string

func (*SysUser) ToORM

func (m *SysUser) ToORM(ctx context.Context) (SysUserORM, error)

ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object

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

func (*SysUserORM) ToPB

func (m *SysUserORM) ToPB(ctx context.Context) (SysUser, error)

ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object

type SysUserORMWithAfterCreate_

type SysUserORMWithAfterCreate_ interface {
	AfterCreate_(context.Context, *gorm.DB) error
}

type SysUserORMWithAfterDeleteSet

type SysUserORMWithAfterDeleteSet interface {
	AfterDeleteSet(context.Context, []*SysUser, *gorm.DB) error
}

type SysUserORMWithAfterDelete_

type SysUserORMWithAfterDelete_ interface {
	AfterDelete_(context.Context, *gorm.DB) error
}

type SysUserORMWithAfterListFind

type SysUserORMWithAfterListFind interface {
	AfterListFind(context.Context, *gorm.DB, *[]SysUserORM) error
}

type SysUserORMWithAfterReadFind

type SysUserORMWithAfterReadFind interface {
	AfterReadFind(context.Context, *gorm.DB) error
}

type SysUserORMWithAfterStrictUpdateSave

type SysUserORMWithAfterStrictUpdateSave interface {
	AfterStrictUpdateSave(context.Context, *gorm.DB) error
}

type SysUserORMWithBeforeCreate_

type SysUserORMWithBeforeCreate_ interface {
	BeforeCreate_(context.Context, *gorm.DB, SysUserORM) (SysUserORM, *gorm.DB, error)
}

type SysUserORMWithBeforeDeleteSet

type SysUserORMWithBeforeDeleteSet interface {
	BeforeDeleteSet(context.Context, []*SysUser, *gorm.DB) (*gorm.DB, error)
}

type SysUserORMWithBeforeDelete_

type SysUserORMWithBeforeDelete_ interface {
	BeforeDelete_(context.Context, *gorm.DB, SysUserORM) (SysUserORM, *gorm.DB, error)
}

type SysUserORMWithBeforeListApplyQuery

type SysUserORMWithBeforeListApplyQuery interface {
	BeforeListApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type SysUserORMWithBeforeListFind

type SysUserORMWithBeforeListFind interface {
	BeforeListFind(context.Context, *gorm.DB) (*gorm.DB, error)
}

type SysUserORMWithBeforeReadApplyQuery

type SysUserORMWithBeforeReadApplyQuery interface {
	BeforeReadApplyQuery(context.Context, *gorm.DB) (*gorm.DB, error)
}

type SysUserORMWithBeforeReadFind

type SysUserORMWithBeforeReadFind interface {
	BeforeReadFind(context.Context, *gorm.DB) (*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 SysUserWithAfterPatchSave

type SysUserWithAfterPatchSave interface {
	AfterPatchSave(context.Context, *SysUser, *field_mask.FieldMask, *gorm.DB) error
}

type SysUserWithAfterToORM

type SysUserWithAfterToORM interface {
	AfterToORM(context.Context, *SysUserORM) error
}

SysUserAfterToORM called after default ToORM code

type SysUserWithAfterToPB

type SysUserWithAfterToPB interface {
	AfterToPB(context.Context, *SysUser) error
}

SysUserAfterToPB called after default ToPB code

type SysUserWithBeforePatchApplyFieldMask

type SysUserWithBeforePatchApplyFieldMask interface {
	BeforePatchApplyFieldMask(context.Context, *SysUser, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type SysUserWithBeforePatchRead

type SysUserWithBeforePatchRead interface {
	BeforePatchRead(context.Context, *SysUser, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type SysUserWithBeforePatchSave

type SysUserWithBeforePatchSave interface {
	BeforePatchSave(context.Context, *SysUser, *field_mask.FieldMask, *gorm.DB) (*gorm.DB, error)
}

type SysUserWithBeforeToORM

type SysUserWithBeforeToORM interface {
	BeforeToORM(context.Context, *SysUserORM) error
}

SysUserBeforeToORM called before default ToORM code

type SysUserWithBeforeToPB

type SysUserWithBeforeToPB interface {
	BeforeToPB(context.Context, *SysUser) error
}

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) GetUserScope

func (UnimplementedUserServer) ListSysUser

func (UnimplementedUserServer) SysUserCreate

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

type UserDefaultServer struct {
	DB *gorm.DB
}

func (*UserDefaultServer) ListSysUser

func (m *UserDefaultServer) ListSysUser(ctx context.Context, in *emptypb.Empty) (*ListUser, error)

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 (c *UserImpl) GetUserInfo(ctx context.Context, in *UserInfoReq) (*SysUser, error)

func (*UserImpl) GetUserScope

func (c *UserImpl) GetUserScope(ctx context.Context, in *SysUser) (*UserScopeResp, error)

func (*UserImpl) ListSysUser

func (c *UserImpl) ListSysUser(ctx context.Context, in *emptypb.Empty) (*ListUser, error)

func (*UserImpl) SysUserCreate

func (c *UserImpl) SysUserCreate(ctx context.Context, in *UserCreateReq) (*SysUser, error)

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

type UserSysUserWithAfterListSysUser

type UserSysUserWithAfterListSysUser interface {
	AfterListSysUser(context.Context, *ListUser, *gorm.DB) error
}

UserSysUserWithAfterListSysUser called before DefaultListSysUserSysUser in the default ListSysUser handler

type UserSysUserWithBeforeListSysUser

type UserSysUserWithBeforeListSysUser interface {
	BeforeListSysUser(context.Context, *gorm.DB) (*gorm.DB, error)
}

UserSysUserWithBeforeListSysUser called before DefaultListSysUserSysUser in the default ListSysUser handler

Jump to

Keyboard shortcuts

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