Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultDeleteSysRole(ctx context.Context, in *SysRole, db *gorm.DB) error
- func DefaultDeleteSysRoleSet(ctx context.Context, in []*SysRole, db *gorm.DB) error
- func RegisterRoleHTTPServer(s *http.Server, srv RoleHTTPServer)
- func RegisterRoleServer(s grpc.ServiceRegistrar, srv RoleServer)
- type ListRoleResp
- func (*ListRoleResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListRoleResp) GetPageInfo() *core.PageInfo
- func (x *ListRoleResp) GetResults() []*SysRole
- func (*ListRoleResp) ProtoMessage()
- func (x *ListRoleResp) ProtoReflect() protoreflect.Message
- func (x *ListRoleResp) Reset()
- func (x *ListRoleResp) String() string
- type RoleClient
- type RoleDefaultServer
- func (m *RoleDefaultServer) CreateSysRole(ctx context.Context, in *SysRole) (*SysRole, error)
- func (m *RoleDefaultServer) DeleteRole(ctx context.Context, in *SysRole) (*emptypb.Empty, error)
- func (m *RoleDefaultServer) ListRole(ctx context.Context, in *emptypb.Empty) (*ListRoleResp, error)
- func (m *RoleDefaultServer) UpdateRole(ctx context.Context, in *SysRole) (*SysRole, error)
- type RoleHTTPClient
- type RoleHTTPClientImpl
- func (c *RoleHTTPClientImpl) CreateSysRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*SysRole, error)
- func (c *RoleHTTPClientImpl) DeleteRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *RoleHTTPClientImpl) GetRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*SysRole, error)
- func (c *RoleHTTPClientImpl) ListRole(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*ListRoleResp, error)
- func (c *RoleHTTPClientImpl) RolePermissions(ctx context.Context, in *SysRole, opts ...http.CallOption) (*RoleMenu, error)
- func (c *RoleHTTPClientImpl) RolePermissionsPut(ctx context.Context, in *RolePermReq, opts ...http.CallOption) (*RoleMenu, error)
- func (c *RoleHTTPClientImpl) RoleSelect(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*RoleSelectResp, error)
- func (c *RoleHTTPClientImpl) UpdateRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*SysRole, error)
- type RoleHTTPServer
- type RoleImpl
- func (c *RoleImpl) CreateSysRole(ctx context.Context, in *SysRole) (*SysRole, error)
- func (c *RoleImpl) DeleteRole(ctx context.Context, in *SysRole) (*emptypb.Empty, error)
- func (c *RoleImpl) GetRole(ctx context.Context, in *SysRole) (*SysRole, error)
- func (c *RoleImpl) ListRole(ctx context.Context, in *emptypb.Empty) (*ListRoleResp, error)
- func (c *RoleImpl) RolePermissions(ctx context.Context, in *SysRole) (*RoleMenu, error)
- func (c *RoleImpl) RolePermissionsPut(ctx context.Context, in *RolePermReq) (*RoleMenu, error)
- func (c *RoleImpl) RoleSelect(ctx context.Context, in *emptypb.Empty) (*RoleSelectResp, error)
- func (c *RoleImpl) UpdateRole(ctx context.Context, in *SysRole) (*SysRole, error)
- type RoleMenu
- type RolePermReq
- type RoleSelectOption
- func (*RoleSelectOption) Descriptor() ([]byte, []int)deprecated
- func (x *RoleSelectOption) GetName() string
- func (x *RoleSelectOption) GetValue() string
- func (*RoleSelectOption) ProtoMessage()
- func (x *RoleSelectOption) ProtoReflect() protoreflect.Message
- func (x *RoleSelectOption) Reset()
- func (x *RoleSelectOption) String() string
- type RoleSelectResp
- type RoleServer
- type RoleSysRoleWithAfterCreateSysRole
- type RoleSysRoleWithAfterListRole
- type RoleSysRoleWithAfterUpdateRole
- type RoleSysRoleWithBeforeCreateSysRole
- type RoleSysRoleWithBeforeListRole
- type RoleSysRoleWithBeforeUpdateRole
- type SysRole
- func DefaultApplyFieldMaskSysRole(ctx context.Context, patchee *SysRole, patcher *SysRole, ...) (*SysRole, error)
- func DefaultCreateSysRole(ctx context.Context, in *SysRole, db *gorm.DB) (*SysRole, error)
- func DefaultListSysRole(ctx context.Context, db *gorm.DB) ([]*SysRole, error)
- func DefaultPatchSetSysRole(ctx context.Context, objects []*SysRole, updateMasks []*field_mask.FieldMask, ...) ([]*SysRole, error)
- func DefaultPatchSysRole(ctx context.Context, in *SysRole, updateMask *field_mask.FieldMask, ...) (*SysRole, error)
- func DefaultReadSysRole(ctx context.Context, in *SysRole, db *gorm.DB) (*SysRole, error)
- func DefaultStrictUpdateSysRole(ctx context.Context, in *SysRole, db *gorm.DB) (*SysRole, error)
- func (*SysRole) Descriptor() ([]byte, []int)deprecated
- func (x *SysRole) GetCode() string
- func (x *SysRole) GetCreateTime() string
- func (x *SysRole) GetDeleted() string
- func (x *SysRole) GetId() int32
- func (x *SysRole) GetMenu() []*menu.SysMenu
- func (x *SysRole) GetName() string
- func (x *SysRole) GetRemarks() string
- func (x *SysRole) GetScopeType() int32
- func (x *SysRole) GetType() int32
- func (x *SysRole) GetUpdateTime() string
- func (*SysRole) ProtoMessage()
- func (x *SysRole) ProtoReflect() protoreflect.Message
- func (x *SysRole) Reset()
- func (x *SysRole) String() string
- func (m *SysRole) ToORM(ctx context.Context) (SysRoleORM, error)
- type SysRoleORM
- type SysRoleORMWithAfterCreate_
- type SysRoleORMWithAfterDeleteSet
- type SysRoleORMWithAfterDelete_
- type SysRoleORMWithAfterListFind
- type SysRoleORMWithAfterReadFind
- type SysRoleORMWithAfterStrictUpdateSave
- type SysRoleORMWithBeforeCreate_
- type SysRoleORMWithBeforeDeleteSet
- type SysRoleORMWithBeforeDelete_
- type SysRoleORMWithBeforeListApplyQuery
- type SysRoleORMWithBeforeListFind
- type SysRoleORMWithBeforeReadApplyQuery
- type SysRoleORMWithBeforeReadFind
- type SysRoleORMWithBeforeStrictUpdateCleanup
- type SysRoleORMWithBeforeStrictUpdateSave
- type SysRoleWithAfterPatchSave
- type SysRoleWithAfterToORM
- type SysRoleWithAfterToPB
- type SysRoleWithBeforePatchApplyFieldMask
- type SysRoleWithBeforePatchRead
- type SysRoleWithBeforePatchSave
- type SysRoleWithBeforeToORM
- type SysRoleWithBeforeToPB
- type UnimplementedRoleServer
- func (UnimplementedRoleServer) CreateSysRole(context.Context, *SysRole) (*SysRole, error)
- func (UnimplementedRoleServer) DeleteRole(context.Context, *SysRole) (*emptypb.Empty, error)
- func (UnimplementedRoleServer) GetRole(context.Context, *SysRole) (*SysRole, error)
- func (UnimplementedRoleServer) ListRole(context.Context, *emptypb.Empty) (*ListRoleResp, error)
- func (UnimplementedRoleServer) RolePermissions(context.Context, *SysRole) (*RoleMenu, error)
- func (UnimplementedRoleServer) RolePermissionsPut(context.Context, *RolePermReq) (*RoleMenu, error)
- func (UnimplementedRoleServer) RoleSelect(context.Context, *emptypb.Empty) (*RoleSelectResp, error)
- func (UnimplementedRoleServer) UpdateRole(context.Context, *SysRole) (*SysRole, error)
- type UnsafeRoleServer
Constants ¶
const ( Role_CreateSysRole_FullMethodName = "/atreus.role.Role/CreateSysRole" Role_UpdateRole_FullMethodName = "/atreus.role.Role/UpdateRole" Role_DeleteRole_FullMethodName = "/atreus.role.Role/DeleteRole" Role_GetRole_FullMethodName = "/atreus.role.Role/GetRole" Role_ListRole_FullMethodName = "/atreus.role.Role/ListRole" Role_RolePermissions_FullMethodName = "/atreus.role.Role/RolePermissions" Role_RolePermissionsPut_FullMethodName = "/atreus.role.Role/RolePermissionsPut" Role_RoleSelect_FullMethodName = "/atreus.role.Role/RoleSelect" )
const OperationRoleCreateSysRole = "/atreus.role.Role/CreateSysRole"
const OperationRoleDeleteRole = "/atreus.role.Role/DeleteRole"
const OperationRoleGetRole = "/atreus.role.Role/GetRole"
const OperationRoleListRole = "/atreus.role.Role/ListRole"
const OperationRoleRolePermissions = "/atreus.role.Role/RolePermissions"
const OperationRoleRolePermissionsPut = "/atreus.role.Role/RolePermissionsPut"
const OperationRoleRoleSelect = "/atreus.role.Role/RoleSelect"
const OperationRoleUpdateRole = "/atreus.role.Role/UpdateRole"
Variables ¶
var File_api_role_role_proto protoreflect.FileDescriptor
var Role_ServiceDesc = grpc.ServiceDesc{ ServiceName: "atreus.role.Role", HandlerType: (*RoleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateSysRole", Handler: _Role_CreateSysRole_Handler, }, { MethodName: "UpdateRole", Handler: _Role_UpdateRole_Handler, }, { MethodName: "DeleteRole", Handler: _Role_DeleteRole_Handler, }, { MethodName: "GetRole", Handler: _Role_GetRole_Handler, }, { MethodName: "ListRole", Handler: _Role_ListRole_Handler, }, { MethodName: "RolePermissions", Handler: _Role_RolePermissions_Handler, }, { MethodName: "RolePermissionsPut", Handler: _Role_RolePermissionsPut_Handler, }, { MethodName: "RoleSelect", Handler: _Role_RoleSelect_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/role/role.proto", }
Role_ServiceDesc is the grpc.ServiceDesc for Role service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func DefaultDeleteSysRole ¶
func DefaultDeleteSysRoleSet ¶
func RegisterRoleHTTPServer ¶
func RegisterRoleHTTPServer(s *http.Server, srv RoleHTTPServer)
func RegisterRoleServer ¶
func RegisterRoleServer(s grpc.ServiceRegistrar, srv RoleServer)
Types ¶
type ListRoleResp ¶
type ListRoleResp struct { // Note repeated field and plural name 'results' Results []*SysRole `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 (*ListRoleResp) Descriptor
deprecated
func (*ListRoleResp) Descriptor() ([]byte, []int)
Deprecated: Use ListRoleResp.ProtoReflect.Descriptor instead.
func (*ListRoleResp) GetPageInfo ¶
func (x *ListRoleResp) GetPageInfo() *core.PageInfo
func (*ListRoleResp) GetResults ¶
func (x *ListRoleResp) GetResults() []*SysRole
func (*ListRoleResp) ProtoMessage ¶
func (*ListRoleResp) ProtoMessage()
func (*ListRoleResp) ProtoReflect ¶
func (x *ListRoleResp) ProtoReflect() protoreflect.Message
func (*ListRoleResp) Reset ¶
func (x *ListRoleResp) Reset()
func (*ListRoleResp) String ¶
func (x *ListRoleResp) String() string
type RoleClient ¶
type RoleClient interface { // 创建角色 CreateSysRole(ctx context.Context, in *SysRole, opts ...grpc.CallOption) (*SysRole, error) // 更新角色 UpdateRole(ctx context.Context, in *SysRole, opts ...grpc.CallOption) (*SysRole, error) // 删除角色 DeleteRole(ctx context.Context, in *SysRole, opts ...grpc.CallOption) (*emptypb.Empty, error) // 获取角色 GetRole(ctx context.Context, in *SysRole, opts ...grpc.CallOption) (*SysRole, error) // 获取角色列表 ListRole(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListRoleResp, error) RolePermissions(ctx context.Context, in *SysRole, opts ...grpc.CallOption) (*RoleMenu, error) RolePermissionsPut(ctx context.Context, in *RolePermReq, opts ...grpc.CallOption) (*RoleMenu, error) RoleSelect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RoleSelectResp, error) }
RoleClient is the client API for Role 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 NewRoleClient ¶
func NewRoleClient(cc grpc.ClientConnInterface) RoleClient
type RoleDefaultServer ¶
func (*RoleDefaultServer) CreateSysRole ¶
CreateSysRole ...
func (*RoleDefaultServer) DeleteRole ¶
DeleteRole ...
func (*RoleDefaultServer) ListRole ¶
func (m *RoleDefaultServer) ListRole(ctx context.Context, in *emptypb.Empty) (*ListRoleResp, error)
ListRole ...
func (*RoleDefaultServer) UpdateRole ¶
UpdateRole ...
type RoleHTTPClient ¶
type RoleHTTPClient interface { CreateSysRole(ctx context.Context, req *SysRole, opts ...http.CallOption) (rsp *SysRole, err error) DeleteRole(ctx context.Context, req *SysRole, opts ...http.CallOption) (rsp *emptypb.Empty, err error) GetRole(ctx context.Context, req *SysRole, opts ...http.CallOption) (rsp *SysRole, err error) ListRole(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *ListRoleResp, err error) RolePermissions(ctx context.Context, req *SysRole, opts ...http.CallOption) (rsp *RoleMenu, err error) RolePermissionsPut(ctx context.Context, req *RolePermReq, opts ...http.CallOption) (rsp *RoleMenu, err error) RoleSelect(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *RoleSelectResp, err error) UpdateRole(ctx context.Context, req *SysRole, opts ...http.CallOption) (rsp *SysRole, err error) }
func NewRoleHTTPClient ¶
func NewRoleHTTPClient(client *http.Client) RoleHTTPClient
type RoleHTTPClientImpl ¶
type RoleHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*RoleHTTPClientImpl) CreateSysRole ¶
func (c *RoleHTTPClientImpl) CreateSysRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*SysRole, error)
func (*RoleHTTPClientImpl) DeleteRole ¶
func (c *RoleHTTPClientImpl) DeleteRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*emptypb.Empty, error)
func (*RoleHTTPClientImpl) GetRole ¶
func (c *RoleHTTPClientImpl) GetRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*SysRole, error)
func (*RoleHTTPClientImpl) ListRole ¶
func (c *RoleHTTPClientImpl) ListRole(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*ListRoleResp, error)
func (*RoleHTTPClientImpl) RolePermissions ¶
func (c *RoleHTTPClientImpl) RolePermissions(ctx context.Context, in *SysRole, opts ...http.CallOption) (*RoleMenu, error)
func (*RoleHTTPClientImpl) RolePermissionsPut ¶
func (c *RoleHTTPClientImpl) RolePermissionsPut(ctx context.Context, in *RolePermReq, opts ...http.CallOption) (*RoleMenu, error)
func (*RoleHTTPClientImpl) RoleSelect ¶
func (c *RoleHTTPClientImpl) RoleSelect(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*RoleSelectResp, error)
func (*RoleHTTPClientImpl) UpdateRole ¶
func (c *RoleHTTPClientImpl) UpdateRole(ctx context.Context, in *SysRole, opts ...http.CallOption) (*SysRole, error)
type RoleHTTPServer ¶
type RoleHTTPServer interface { // CreateSysRole 创建角色 CreateSysRole(context.Context, *SysRole) (*SysRole, error) // DeleteRole 删除角色 DeleteRole(context.Context, *SysRole) (*emptypb.Empty, error) // GetRole 获取角色 GetRole(context.Context, *SysRole) (*SysRole, error) // ListRole 获取角色列表 ListRole(context.Context, *emptypb.Empty) (*ListRoleResp, error) RolePermissions(context.Context, *SysRole) (*RoleMenu, error) RolePermissionsPut(context.Context, *RolePermReq) (*RoleMenu, error) RoleSelect(context.Context, *emptypb.Empty) (*RoleSelectResp, error) // UpdateRole 更新角色 UpdateRole(context.Context, *SysRole) (*SysRole, error) }
type RoleImpl ¶
type RoleImpl struct {
// contains filtered or unexported fields
}
func NewRoleImpl ¶
func NewRoleImpl(conn *grpc.ClientConn) *RoleImpl
func (*RoleImpl) CreateSysRole ¶
func (*RoleImpl) DeleteRole ¶
func (*RoleImpl) RolePermissions ¶
func (*RoleImpl) RolePermissionsPut ¶
func (*RoleImpl) RoleSelect ¶
type RoleMenu ¶
type RoleMenu struct { Menus []int32 `protobuf:"varint,1,rep,packed,name=menus,proto3" json:"menus,omitempty"` // contains filtered or unexported fields }
func (*RoleMenu) Descriptor
deprecated
func (*RoleMenu) ProtoMessage ¶
func (*RoleMenu) ProtoMessage()
func (*RoleMenu) ProtoReflect ¶
func (x *RoleMenu) ProtoReflect() protoreflect.Message
type RolePermReq ¶
type RolePermReq struct { Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*RolePermReq) Descriptor
deprecated
func (*RolePermReq) Descriptor() ([]byte, []int)
Deprecated: Use RolePermReq.ProtoReflect.Descriptor instead.
func (*RolePermReq) GetCode ¶
func (x *RolePermReq) GetCode() string
func (*RolePermReq) GetIds ¶
func (x *RolePermReq) GetIds() []int32
func (*RolePermReq) ProtoMessage ¶
func (*RolePermReq) ProtoMessage()
func (*RolePermReq) ProtoReflect ¶
func (x *RolePermReq) ProtoReflect() protoreflect.Message
func (*RolePermReq) Reset ¶
func (x *RolePermReq) Reset()
func (*RolePermReq) String ¶
func (x *RolePermReq) String() string
type RoleSelectOption ¶
type RoleSelectOption struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*RoleSelectOption) Descriptor
deprecated
func (*RoleSelectOption) Descriptor() ([]byte, []int)
Deprecated: Use RoleSelectOption.ProtoReflect.Descriptor instead.
func (*RoleSelectOption) GetName ¶
func (x *RoleSelectOption) GetName() string
func (*RoleSelectOption) GetValue ¶
func (x *RoleSelectOption) GetValue() string
func (*RoleSelectOption) ProtoMessage ¶
func (*RoleSelectOption) ProtoMessage()
func (*RoleSelectOption) ProtoReflect ¶
func (x *RoleSelectOption) ProtoReflect() protoreflect.Message
func (*RoleSelectOption) Reset ¶
func (x *RoleSelectOption) Reset()
func (*RoleSelectOption) String ¶
func (x *RoleSelectOption) String() string
type RoleSelectResp ¶
type RoleSelectResp struct { Options []*RoleSelectOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*RoleSelectResp) Descriptor
deprecated
func (*RoleSelectResp) Descriptor() ([]byte, []int)
Deprecated: Use RoleSelectResp.ProtoReflect.Descriptor instead.
func (*RoleSelectResp) GetOptions ¶
func (x *RoleSelectResp) GetOptions() []*RoleSelectOption
func (*RoleSelectResp) ProtoMessage ¶
func (*RoleSelectResp) ProtoMessage()
func (*RoleSelectResp) ProtoReflect ¶
func (x *RoleSelectResp) ProtoReflect() protoreflect.Message
func (*RoleSelectResp) Reset ¶
func (x *RoleSelectResp) Reset()
func (*RoleSelectResp) String ¶
func (x *RoleSelectResp) String() string
type RoleServer ¶
type RoleServer interface { // 创建角色 CreateSysRole(context.Context, *SysRole) (*SysRole, error) // 更新角色 UpdateRole(context.Context, *SysRole) (*SysRole, error) // 删除角色 DeleteRole(context.Context, *SysRole) (*emptypb.Empty, error) // 获取角色 GetRole(context.Context, *SysRole) (*SysRole, error) // 获取角色列表 ListRole(context.Context, *emptypb.Empty) (*ListRoleResp, error) RolePermissions(context.Context, *SysRole) (*RoleMenu, error) RolePermissionsPut(context.Context, *RolePermReq) (*RoleMenu, error) RoleSelect(context.Context, *emptypb.Empty) (*RoleSelectResp, error) }
RoleServer is the server API for Role service. All implementations should embed UnimplementedRoleServer for forward compatibility
type RoleSysRoleWithAfterCreateSysRole ¶
type RoleSysRoleWithAfterCreateSysRole interface {
AfterCreateSysRole(context.Context, *SysRole, *gorm.DB) error
}
RoleSysRoleWithAfterCreateSysRole called before DefaultCreateSysRoleSysRole in the default CreateSysRole handler
type RoleSysRoleWithAfterListRole ¶
type RoleSysRoleWithAfterListRole interface {
AfterListRole(context.Context, *ListRoleResp, *gorm.DB) error
}
RoleSysRoleWithAfterListRole called before DefaultListRoleSysRole in the default ListRole handler
type RoleSysRoleWithAfterUpdateRole ¶
type RoleSysRoleWithAfterUpdateRole interface {
AfterUpdateRole(context.Context, *SysRole, *gorm.DB) error
}
RoleSysRoleWithAfterUpdateRole called before DefaultUpdateRoleSysRole in the default UpdateRole handler
type RoleSysRoleWithBeforeCreateSysRole ¶
type RoleSysRoleWithBeforeCreateSysRole interface {
BeforeCreateSysRole(context.Context, *gorm.DB) (*gorm.DB, error)
}
RoleSysRoleWithBeforeCreateSysRole called before DefaultCreateSysRoleSysRole in the default CreateSysRole handler
type RoleSysRoleWithBeforeListRole ¶
type RoleSysRoleWithBeforeListRole interface {
BeforeListRole(context.Context, *gorm.DB) (*gorm.DB, error)
}
RoleSysRoleWithBeforeListRole called before DefaultListRoleSysRole in the default ListRole handler
type RoleSysRoleWithBeforeUpdateRole ¶
type RoleSysRoleWithBeforeUpdateRole interface {
BeforeUpdateRole(context.Context, *gorm.DB) (*gorm.DB, error)
}
RoleSysRoleWithBeforeUpdateRole called before DefaultUpdateRoleSysRole in the default UpdateRole handler
type SysRole ¶
type SysRole struct { // 角色编号 Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 角色名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 角色标识 Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 角色备注 Remarks string `protobuf:"bytes,4,opt,name=remarks,proto3" json:"remarks,omitempty"` // 角色类型,1:系统角色 2:业务角色 Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` // 逻辑删除标识,已删除:0,未删除:删除时间戳 Deleted string `protobuf:"bytes,6,opt,name=deleted,proto3" json:"deleted,omitempty"` // 创建时间 CreateTime string `protobuf:"bytes,7,opt,name=createTime,proto3" json:"createTime,omitempty"` // 修改时间 UpdateTime string `protobuf:"bytes,8,opt,name=updateTime,proto3" json:"updateTime,omitempty"` // 数据权限:1全部,2本人,3本人及子部门,4本部门 ScopeType int32 `protobuf:"varint,9,opt,name=scopeType,proto3" json:"scopeType,omitempty"` Menu []*menu.SysMenu `protobuf:"bytes,10,rep,name=menu,proto3" json:"menu,omitempty"` // contains filtered or unexported fields }
func DefaultApplyFieldMaskSysRole ¶
func DefaultApplyFieldMaskSysRole(ctx context.Context, patchee *SysRole, patcher *SysRole, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*SysRole, error)
DefaultApplyFieldMaskSysRole patches an pbObject with patcher according to a field mask.
func DefaultCreateSysRole ¶
DefaultCreateSysRole executes a basic gorm create call
func DefaultListSysRole ¶
DefaultListSysRole executes a gorm list call
func DefaultPatchSetSysRole ¶
func DefaultPatchSetSysRole(ctx context.Context, objects []*SysRole, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*SysRole, error)
DefaultPatchSetSysRole executes a bulk gorm update call with patch behavior
func DefaultPatchSysRole ¶
func DefaultPatchSysRole(ctx context.Context, in *SysRole, updateMask *field_mask.FieldMask, db *gorm.DB) (*SysRole, error)
DefaultPatchSysRole executes a basic gorm update call with patch behavior
func DefaultReadSysRole ¶
func DefaultStrictUpdateSysRole ¶
DefaultStrictUpdateSysRole clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*SysRole) Descriptor
deprecated
func (*SysRole) GetCreateTime ¶
func (*SysRole) GetDeleted ¶
func (*SysRole) GetRemarks ¶
func (*SysRole) GetScopeType ¶
func (*SysRole) GetUpdateTime ¶
func (*SysRole) ProtoMessage ¶
func (*SysRole) ProtoMessage()
func (*SysRole) ProtoReflect ¶
func (x *SysRole) ProtoReflect() protoreflect.Message
type SysRoleORM ¶
type SysRoleORM struct { Code string CreateTime string Deleted string Id int32 `gorm:"type:integer;primaryKey;autoIncrement"` Menu []*menu.SysMenuORM `gorm:"foreignKey:Id;references:Id;many2many:sys_role_menu;joinForeignKey:SysRoleId;joinReferences:SysMenuId"` Name string Remarks string ScopeType int32 Type int32 UpdateTime string }
func (*SysRoleORM) BeforeStrictUpdateCleanup ¶
func (o *SysRoleORM) BeforeStrictUpdateCleanup(ctx context.Context, db *gorm.DB, orm SysRoleORM) (SysRoleORM, *gorm.DB, error)
func (SysRoleORM) TableName ¶
func (SysRoleORM) TableName() string
TableName overrides the default tablename generated by GORM
type SysRoleORMWithBeforeCreate_ ¶
type SysRoleORMWithBeforeCreate_ interface {
BeforeCreate_(context.Context, *gorm.DB, SysRoleORM) (SysRoleORM, *gorm.DB, error)
}
type SysRoleORMWithBeforeDelete_ ¶
type SysRoleORMWithBeforeDelete_ interface {
BeforeDelete_(context.Context, *gorm.DB, SysRoleORM) (SysRoleORM, *gorm.DB, error)
}
type SysRoleORMWithBeforeStrictUpdateCleanup ¶
type SysRoleORMWithBeforeStrictUpdateCleanup interface {
BeforeStrictUpdateCleanup(context.Context, *gorm.DB, SysRoleORM) (SysRoleORM, *gorm.DB, error)
}
type SysRoleORMWithBeforeStrictUpdateSave ¶
type SysRoleORMWithBeforeStrictUpdateSave interface {
BeforeStrictUpdateSave(context.Context, *gorm.DB, SysRoleORM) (SysRoleORM, *gorm.DB, error)
}
type SysRoleWithAfterToORM ¶
type SysRoleWithAfterToORM interface {
AfterToORM(context.Context, *SysRoleORM) error
}
SysRoleAfterToORM called after default ToORM code
type SysRoleWithAfterToPB ¶
SysRoleAfterToPB called after default ToPB code
type SysRoleWithBeforeToORM ¶
type SysRoleWithBeforeToORM interface {
BeforeToORM(context.Context, *SysRoleORM) error
}
SysRoleBeforeToORM called before default ToORM code
type SysRoleWithBeforeToPB ¶
SysRoleBeforeToPB called before default ToPB code
type UnimplementedRoleServer ¶
type UnimplementedRoleServer struct { }
UnimplementedRoleServer should be embedded to have forward compatible implementations.
func (UnimplementedRoleServer) CreateSysRole ¶
func (UnimplementedRoleServer) DeleteRole ¶
func (UnimplementedRoleServer) ListRole ¶
func (UnimplementedRoleServer) ListRole(context.Context, *emptypb.Empty) (*ListRoleResp, error)
func (UnimplementedRoleServer) RolePermissions ¶
func (UnimplementedRoleServer) RolePermissionsPut ¶
func (UnimplementedRoleServer) RolePermissionsPut(context.Context, *RolePermReq) (*RoleMenu, error)
func (UnimplementedRoleServer) RoleSelect ¶
func (UnimplementedRoleServer) RoleSelect(context.Context, *emptypb.Empty) (*RoleSelectResp, error)
func (UnimplementedRoleServer) UpdateRole ¶
type UnsafeRoleServer ¶
type UnsafeRoleServer interface {
// contains filtered or unexported methods
}
UnsafeRoleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RoleServer will result in compilation errors.