Documentation ¶
Index ¶
- Constants
- Variables
- func HttpEntry() *http.EntrySet
- func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer)
- type CreateRoleRequest
- func (*CreateRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRoleRequest) GetDescription() string
- func (x *CreateRoleRequest) GetName() string
- func (x *CreateRoleRequest) GetPermissions() []*Permission
- func (x *CreateRoleRequest) GetType() RoleType
- func (req *CreateRoleRequest) IsCumstomType() bool
- func (*CreateRoleRequest) ProtoMessage()
- func (x *CreateRoleRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRoleRequest) Reset()
- func (x *CreateRoleRequest) String() string
- func (req *CreateRoleRequest) Validate() error
- type DeleteRoleRequest
- type DescribeRoleRequest
- func (*DescribeRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeRoleRequest) GetId() string
- func (x *DescribeRoleRequest) GetName() string
- func (x *DescribeRoleRequest) GetType() RoleType
- func (x *DescribeRoleRequest) GetWithPermissions() bool
- func (*DescribeRoleRequest) ProtoMessage()
- func (x *DescribeRoleRequest) ProtoReflect() protoreflect.Message
- func (x *DescribeRoleRequest) Reset()
- func (x *DescribeRoleRequest) String() string
- func (req *DescribeRoleRequest) Validate() error
- type EffectType
- func (EffectType) Descriptor() protoreflect.EnumDescriptor
- func (x EffectType) Enum() *EffectType
- func (EffectType) EnumDescriptor() ([]byte, []int)deprecated
- func (t EffectType) Equal(target EffectType) bool
- func (t EffectType) IsIn(targets ...EffectType) bool
- func (t EffectType) MarshalJSON() ([]byte, error)
- func (x EffectType) Number() protoreflect.EnumNumber
- func (x EffectType) String() string
- func (EffectType) Type() protoreflect.EnumType
- func (t *EffectType) UnmarshalJSON(b []byte) error
- type Permission
- func (*Permission) Descriptor() ([]byte, []int)deprecated
- func (x *Permission) GetEffect() EffectType
- func (x *Permission) GetLabelKey() string
- func (x *Permission) GetLabelValues() []string
- func (x *Permission) GetMatchAll() bool
- func (x *Permission) GetResourceName() string
- func (x *Permission) GetServiceId() string
- func (p *Permission) ID(namespace string) string
- func (p *Permission) MatchLabel(label map[string]string) bool
- func (p *Permission) MatchResource(serviceID, resourceName string) bool
- func (*Permission) ProtoMessage()
- func (x *Permission) ProtoReflect() protoreflect.Message
- func (x *Permission) Reset()
- func (x *Permission) String() string
- func (p *Permission) Validate() error
- type PermissionSet
- func (s *PermissionSet) Add(items ...*Permission)
- func (*PermissionSet) Descriptor() ([]byte, []int)deprecated
- func (x *PermissionSet) GetItems() []*Permission
- func (x *PermissionSet) GetTotal() int64
- func (*PermissionSet) ProtoMessage()
- func (x *PermissionSet) ProtoReflect() protoreflect.Message
- func (x *PermissionSet) Reset()
- func (x *PermissionSet) String() string
- type QueryRoleRequest
- func (*QueryRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRoleRequest) GetPage() *page.PageRequest
- func (x *QueryRoleRequest) GetType() RoleType
- func (x *QueryRoleRequest) GetWithPermissions() bool
- func (*QueryRoleRequest) ProtoMessage()
- func (x *QueryRoleRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRoleRequest) Reset()
- func (x *QueryRoleRequest) String() string
- func (req *QueryRoleRequest) Validate() error
- type Role
- func (r *Role) CheckPermission() error
- func (*Role) Descriptor() ([]byte, []int)deprecated
- func (x *Role) GetCreateAt() int64
- func (x *Role) GetCreater() string
- func (x *Role) GetDescription() string
- func (x *Role) GetDomain() string
- func (x *Role) GetId() string
- func (x *Role) GetName() string
- func (x *Role) GetPermissions() []*Permission
- func (x *Role) GetType() RoleType
- func (x *Role) GetUpdateAt() int64
- func (r *Role) HasPermission(ep *endpoint.Endpoint) (*Permission, bool, error)
- func (*Role) ProtoMessage()
- func (x *Role) ProtoReflect() protoreflect.Message
- func (x *Role) Reset()
- func (x *Role) String() string
- type RoleServiceClient
- type RoleServiceServer
- type RoleType
- func (RoleType) Descriptor() protoreflect.EnumDescriptor
- func (x RoleType) Enum() *RoleType
- func (RoleType) EnumDescriptor() ([]byte, []int)deprecated
- func (t RoleType) Equal(target RoleType) bool
- func (t RoleType) IsIn(targets ...RoleType) bool
- func (t RoleType) MarshalJSON() ([]byte, error)
- func (x RoleType) Number() protoreflect.EnumNumber
- func (x RoleType) String() string
- func (RoleType) Type() protoreflect.EnumType
- func (t *RoleType) UnmarshalJSON(b []byte) error
- type Set
- func (s *Set) Add(item *Role)
- func (*Set) Descriptor() ([]byte, []int)deprecated
- func (x *Set) GetItems() []*Role
- func (x *Set) GetTotal() int64
- func (s *Set) HasPermission(ep *endpoint.Endpoint) (*Permission, bool, error)
- func (s *Set) Permissions() *PermissionSet
- func (*Set) ProtoMessage()
- func (x *Set) ProtoReflect() protoreflect.Message
- func (x *Set) Reset()
- func (x *Set) String() string
- type UnimplementedRoleServiceServer
- func (UnimplementedRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*Role, error)
- func (UnimplementedRoleServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*Role, error)
- func (UnimplementedRoleServiceServer) DescribeRole(context.Context, *DescribeRoleRequest) (*Role, error)
- func (UnimplementedRoleServiceServer) QueryRole(context.Context, *QueryRoleRequest) (*Set, error)
- type UnsafeRoleServiceServer
Constants ¶
const ( // AdminRoleName 管理员角色名称, 系统初始化时创建 AdminRoleName = "admin" // VisitorRoleName 访客角色名称, 系统初始化时创建 VisitorRoleName = "visitor" )
const (
// MaxPermissionCount 一个角色最多可以容纳的权限条数
MaxPermissionCount = 500
)
Variables ¶
var ( RoleType_name = map[int32]string{ 0: "NULL", 1: "BUILDIN", 2: "GLOBAL", 3: "CUSTOM", } RoleType_value = map[string]int32{ "NULL": 0, "BUILDIN": 1, "GLOBAL": 2, "CUSTOM": 3, } )
Enum value maps for RoleType.
var ( EffectType_name = map[int32]string{ 0: "ALLOW", 1: "DENY", } EffectType_value = map[string]int32{ "ALLOW": 0, "DENY": 1, } )
Enum value maps for EffectType.
var File_pkg_role_pb_enum_proto protoreflect.FileDescriptor
var File_pkg_role_pb_request_proto protoreflect.FileDescriptor
var File_pkg_role_pb_role_proto protoreflect.FileDescriptor
var File_pkg_role_pb_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRoleServiceServer ¶ added in v0.2.0
func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer)
Types ¶
type CreateRoleRequest ¶
type CreateRoleRequest struct { // 角色类型 Type RoleType `protobuf:"varint,1,opt,name=type,proto3,enum=keyauth.role.RoleType" json:"type" bson:"type"` // 应用名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name" validate:"required,lte=30"` // 应用简单的描述 Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description" bson:"description" validate:"lte=400"` // 读权限 Permissions []*Permission `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions" bson:"permissions"` // contains filtered or unexported fields }
CreateRoleRequest 创建应用请求
func NewCreateRoleRequest ¶
func NewCreateRoleRequest() *CreateRoleRequest
NewCreateRoleRequest 实例化请求
func (*CreateRoleRequest) Descriptor
deprecated
added in
v0.2.0
func (*CreateRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead.
func (*CreateRoleRequest) GetDescription ¶ added in v0.2.0
func (x *CreateRoleRequest) GetDescription() string
func (*CreateRoleRequest) GetName ¶ added in v0.2.0
func (x *CreateRoleRequest) GetName() string
func (*CreateRoleRequest) GetPermissions ¶ added in v0.2.0
func (x *CreateRoleRequest) GetPermissions() []*Permission
func (*CreateRoleRequest) GetType ¶ added in v0.2.0
func (x *CreateRoleRequest) GetType() RoleType
func (*CreateRoleRequest) IsCumstomType ¶ added in v0.2.0
func (req *CreateRoleRequest) IsCumstomType() bool
IsCumstomType todo
func (*CreateRoleRequest) ProtoMessage ¶ added in v0.2.0
func (*CreateRoleRequest) ProtoMessage()
func (*CreateRoleRequest) ProtoReflect ¶ added in v0.2.0
func (x *CreateRoleRequest) ProtoReflect() protoreflect.Message
func (*CreateRoleRequest) Reset ¶ added in v0.2.0
func (x *CreateRoleRequest) Reset()
func (*CreateRoleRequest) String ¶ added in v0.2.0
func (x *CreateRoleRequest) String() string
type DeleteRoleRequest ¶ added in v0.2.0
type DeleteRoleRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" validate:"required,lte=64"` // contains filtered or unexported fields }
DeleteRoleRequest role删除
func (*DeleteRoleRequest) Descriptor
deprecated
added in
v0.2.0
func (*DeleteRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRoleRequest.ProtoReflect.Descriptor instead.
func (*DeleteRoleRequest) GetId ¶ added in v0.2.0
func (x *DeleteRoleRequest) GetId() string
func (*DeleteRoleRequest) ProtoMessage ¶ added in v0.2.0
func (*DeleteRoleRequest) ProtoMessage()
func (*DeleteRoleRequest) ProtoReflect ¶ added in v0.2.0
func (x *DeleteRoleRequest) ProtoReflect() protoreflect.Message
func (*DeleteRoleRequest) Reset ¶ added in v0.2.0
func (x *DeleteRoleRequest) Reset()
func (*DeleteRoleRequest) String ¶ added in v0.2.0
func (x *DeleteRoleRequest) String() string
type DescribeRoleRequest ¶
type DescribeRoleRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" validate:"required,lte=64"` WithPermissions bool `protobuf:"varint,3,opt,name=with_permissions,json=withPermissions,proto3" json:"with_permissions" bson:"with_permissions"` Type RoleType `protobuf:"varint,4,opt,name=type,proto3,enum=keyauth.role.RoleType" json:"type" bson:"type"` // contains filtered or unexported fields }
DescribeRoleRequest role详情
func NewDescribeRoleRequestWithID ¶ added in v0.2.0
func NewDescribeRoleRequestWithID(id string) *DescribeRoleRequest
NewDescribeRoleRequestWithID todo
func NewDescribeRoleRequestWithName ¶ added in v0.2.0
func NewDescribeRoleRequestWithName(name string) *DescribeRoleRequest
NewDescribeRoleRequestWithName todo
func (*DescribeRoleRequest) Descriptor
deprecated
added in
v0.2.0
func (*DescribeRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribeRoleRequest.ProtoReflect.Descriptor instead.
func (*DescribeRoleRequest) GetId ¶ added in v0.2.0
func (x *DescribeRoleRequest) GetId() string
func (*DescribeRoleRequest) GetName ¶ added in v0.2.0
func (x *DescribeRoleRequest) GetName() string
func (*DescribeRoleRequest) GetType ¶ added in v0.2.0
func (x *DescribeRoleRequest) GetType() RoleType
func (*DescribeRoleRequest) GetWithPermissions ¶ added in v0.2.0
func (x *DescribeRoleRequest) GetWithPermissions() bool
func (*DescribeRoleRequest) ProtoMessage ¶ added in v0.2.0
func (*DescribeRoleRequest) ProtoMessage()
func (*DescribeRoleRequest) ProtoReflect ¶ added in v0.2.0
func (x *DescribeRoleRequest) ProtoReflect() protoreflect.Message
func (*DescribeRoleRequest) Reset ¶ added in v0.2.0
func (x *DescribeRoleRequest) Reset()
func (*DescribeRoleRequest) String ¶ added in v0.2.0
func (x *DescribeRoleRequest) String() string
func (*DescribeRoleRequest) Validate ¶ added in v0.2.0
func (req *DescribeRoleRequest) Validate() error
Validate todo
type EffectType ¶
type EffectType int32
EffectType 授权效力包括两种:允许(Allow)和拒绝(Deny)
const ( // 允许访问 EffectType_ALLOW EffectType = 0 // 拒绝访问 EffectType_DENY EffectType = 1 )
func ParseEffectTypeFromString ¶ added in v0.2.0
func ParseEffectTypeFromString(str string) (EffectType, error)
ParseEffectTypeFromString Parse EffectType from string
func (EffectType) Descriptor ¶ added in v0.2.0
func (EffectType) Descriptor() protoreflect.EnumDescriptor
func (EffectType) Enum ¶ added in v0.2.0
func (x EffectType) Enum() *EffectType
func (EffectType) EnumDescriptor
deprecated
added in
v0.2.0
func (EffectType) EnumDescriptor() ([]byte, []int)
Deprecated: Use EffectType.Descriptor instead.
func (EffectType) Equal ¶ added in v0.2.0
func (t EffectType) Equal(target EffectType) bool
Equal type compare
func (EffectType) IsIn ¶ added in v0.2.0
func (t EffectType) IsIn(targets ...EffectType) bool
IsIn todo
func (EffectType) Number ¶ added in v0.2.0
func (x EffectType) Number() protoreflect.EnumNumber
func (EffectType) String ¶
func (x EffectType) String() string
func (EffectType) Type ¶ added in v0.2.0
func (EffectType) Type() protoreflect.EnumType
func (*EffectType) UnmarshalJSON ¶
func (t *EffectType) UnmarshalJSON(b []byte) error
UnmarshalJSON todo
type Permission ¶
type Permission struct { // 效力 Effect EffectType `protobuf:"varint,1,opt,name=effect,proto3,enum=keyauth.role.EffectType" json:"effect" bson:"effect"` // 服务ID ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id" bson:"service_id"` // 资源列表 ResourceName string `protobuf:"bytes,3,opt,name=resource_name,json=resourceName,proto3" json:"resource_name" bson:"resource_name"` // 维度 LabelKey string `protobuf:"bytes,4,opt,name=label_key,json=labelKey,proto3" json:"label_key" bson:"label_key"` // 适配所有值 MatchAll bool `protobuf:"varint,5,opt,name=match_all,json=matchAll,proto3" json:"match_all" bson:"match_all"` // 标识值 LabelValues []string `protobuf:"bytes,6,rep,name=label_values,json=labelValues,proto3" json:"label_values" bson:"label_values"` // contains filtered or unexported fields }
Permission 权限
func (*Permission) Descriptor
deprecated
added in
v0.2.0
func (*Permission) Descriptor() ([]byte, []int)
Deprecated: Use Permission.ProtoReflect.Descriptor instead.
func (*Permission) GetEffect ¶ added in v0.2.0
func (x *Permission) GetEffect() EffectType
func (*Permission) GetLabelKey ¶ added in v0.2.0
func (x *Permission) GetLabelKey() string
func (*Permission) GetLabelValues ¶ added in v0.2.0
func (x *Permission) GetLabelValues() []string
func (*Permission) GetMatchAll ¶ added in v0.2.0
func (x *Permission) GetMatchAll() bool
func (*Permission) GetResourceName ¶ added in v0.2.0
func (x *Permission) GetResourceName() string
func (*Permission) GetServiceId ¶ added in v0.2.0
func (x *Permission) GetServiceId() string
func (*Permission) MatchLabel ¶ added in v0.2.0
func (p *Permission) MatchLabel(label map[string]string) bool
MatchLabel 匹配Label
func (*Permission) MatchResource ¶ added in v0.2.0
func (p *Permission) MatchResource(serviceID, resourceName string) bool
MatchResource 检测资源是否匹配
func (*Permission) ProtoMessage ¶ added in v0.2.0
func (*Permission) ProtoMessage()
func (*Permission) ProtoReflect ¶ added in v0.2.0
func (x *Permission) ProtoReflect() protoreflect.Message
func (*Permission) Reset ¶ added in v0.2.0
func (x *Permission) Reset()
func (*Permission) String ¶ added in v0.2.0
func (x *Permission) String() string
type PermissionSet ¶
type PermissionSet struct { Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"` Items []*Permission `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"` // contains filtered or unexported fields }
PermissionSet 用户列表
func NewPermissionSet ¶ added in v0.2.0
func NewPermissionSet() *PermissionSet
NewPermissionSet todo
func (*PermissionSet) Descriptor
deprecated
added in
v0.2.0
func (*PermissionSet) Descriptor() ([]byte, []int)
Deprecated: Use PermissionSet.ProtoReflect.Descriptor instead.
func (*PermissionSet) GetItems ¶ added in v0.2.0
func (x *PermissionSet) GetItems() []*Permission
func (*PermissionSet) GetTotal ¶ added in v0.2.0
func (x *PermissionSet) GetTotal() int64
func (*PermissionSet) ProtoMessage ¶ added in v0.2.0
func (*PermissionSet) ProtoMessage()
func (*PermissionSet) ProtoReflect ¶ added in v0.2.0
func (x *PermissionSet) ProtoReflect() protoreflect.Message
func (*PermissionSet) Reset ¶ added in v0.2.0
func (x *PermissionSet) Reset()
func (*PermissionSet) String ¶ added in v0.2.0
func (x *PermissionSet) String() string
type QueryRoleRequest ¶
type QueryRoleRequest struct { Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page" bson:"page"` Type RoleType `protobuf:"varint,2,opt,name=type,proto3,enum=keyauth.role.RoleType" json:"type" bson:"type"` WithPermissions bool `protobuf:"varint,3,opt,name=with_permissions,json=withPermissions,proto3" json:"with_permissions" bson:"with_permissions"` // contains filtered or unexported fields }
QueryRoleRequest 列表查询
func NewQueryRoleRequest ¶
func NewQueryRoleRequest(pageReq *request.PageRequest) *QueryRoleRequest
NewQueryRoleRequest 列表查询请求
func NewQueryRoleRequestFromHTTP ¶ added in v0.2.0
func NewQueryRoleRequestFromHTTP(r *http.Request) *QueryRoleRequest
NewQueryRoleRequestFromHTTP 列表查询请求
func (*QueryRoleRequest) Descriptor
deprecated
added in
v0.2.0
func (*QueryRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRoleRequest.ProtoReflect.Descriptor instead.
func (*QueryRoleRequest) GetPage ¶ added in v0.2.0
func (x *QueryRoleRequest) GetPage() *page.PageRequest
func (*QueryRoleRequest) GetType ¶ added in v0.2.0
func (x *QueryRoleRequest) GetType() RoleType
func (*QueryRoleRequest) GetWithPermissions ¶ added in v0.2.0
func (x *QueryRoleRequest) GetWithPermissions() bool
func (*QueryRoleRequest) ProtoMessage ¶ added in v0.2.0
func (*QueryRoleRequest) ProtoMessage()
func (*QueryRoleRequest) ProtoReflect ¶ added in v0.2.0
func (x *QueryRoleRequest) ProtoReflect() protoreflect.Message
func (*QueryRoleRequest) Reset ¶ added in v0.2.0
func (x *QueryRoleRequest) Reset()
func (*QueryRoleRequest) String ¶ added in v0.2.0
func (x *QueryRoleRequest) String() string
func (*QueryRoleRequest) Validate ¶ added in v0.2.0
func (req *QueryRoleRequest) Validate() error
Validate todo
type Role ¶
type Role struct { // 角色ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // 创建时间` CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty" bson:"create_at"` // 更新时间 UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty" bson:"update_at"` // 角色所属域 Domain string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain,omitempty" bson:"domain"` // 创建人 Creater string `protobuf:"bytes,5,opt,name=creater,proto3" json:"creater" bson:"creater"` // 角色类型 Type RoleType `protobuf:"varint,6,opt,name=type,proto3,enum=keyauth.role.RoleType" json:"type" bson:"type"` // 应用名称 Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty" bson:"name" validate:"required,lte=30"` // 应用简单的描述 Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty" bson:"description" validate:"lte=400"` // 读权限 Permissions []*Permission `protobuf:"bytes,9,rep,name=permissions,proto3" json:"permissions,omitempty" bson:"permissions"` // contains filtered or unexported fields }
Role is rbac's role
func (*Role) Descriptor
deprecated
added in
v0.2.0
func (*Role) GetCreateAt ¶ added in v0.2.0
func (*Role) GetCreater ¶ added in v0.2.0
func (*Role) GetDescription ¶ added in v0.2.0
func (*Role) GetPermissions ¶ added in v0.2.0
func (x *Role) GetPermissions() []*Permission
func (*Role) GetUpdateAt ¶ added in v0.2.0
func (*Role) HasPermission ¶ added in v0.2.0
HasPermission 权限判断
func (*Role) ProtoMessage ¶ added in v0.2.0
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶ added in v0.2.0
func (x *Role) ProtoReflect() protoreflect.Message
type RoleServiceClient ¶ added in v0.2.0
type RoleServiceClient interface { CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*Role, error) QueryRole(ctx context.Context, in *QueryRoleRequest, opts ...grpc.CallOption) (*Set, error) DescribeRole(ctx context.Context, in *DescribeRoleRequest, opts ...grpc.CallOption) (*Role, error) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*Role, error) }
RoleServiceClient is the client API for RoleService 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 NewRoleServiceClient ¶ added in v0.2.0
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient
type RoleServiceServer ¶ added in v0.2.0
type RoleServiceServer interface { CreateRole(context.Context, *CreateRoleRequest) (*Role, error) QueryRole(context.Context, *QueryRoleRequest) (*Set, error) DescribeRole(context.Context, *DescribeRoleRequest) (*Role, error) DeleteRole(context.Context, *DeleteRoleRequest) (*Role, error) // contains filtered or unexported methods }
RoleServiceServer is the server API for RoleService service. All implementations must embed UnimplementedRoleServiceServer for forward compatibility
type RoleType ¶ added in v0.2.0
type RoleType int32
RoleType 角色
func ParseRoleTypeFromString ¶ added in v0.2.0
ParseRoleTypeFromString Parse RoleType from string
func (RoleType) Descriptor ¶ added in v0.2.0
func (RoleType) Descriptor() protoreflect.EnumDescriptor
func (RoleType) EnumDescriptor
deprecated
added in
v0.2.0
func (RoleType) MarshalJSON ¶ added in v0.2.0
MarshalJSON todo
func (RoleType) Number ¶ added in v0.2.0
func (x RoleType) Number() protoreflect.EnumNumber
func (RoleType) Type ¶ added in v0.2.0
func (RoleType) Type() protoreflect.EnumType
func (*RoleType) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON todo
type Set ¶
type Set struct { Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"` Items []*Role `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"` // contains filtered or unexported fields }
func (*Set) Descriptor
deprecated
added in
v0.2.0
func (*Set) HasPermission ¶ added in v0.2.0
HasPermission todo
func (*Set) Permissions ¶ added in v0.2.0
func (s *Set) Permissions() *PermissionSet
Permissions todo
func (*Set) ProtoMessage ¶ added in v0.2.0
func (*Set) ProtoMessage()
func (*Set) ProtoReflect ¶ added in v0.2.0
func (x *Set) ProtoReflect() protoreflect.Message
type UnimplementedRoleServiceServer ¶ added in v0.2.0
type UnimplementedRoleServiceServer struct { }
UnimplementedRoleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedRoleServiceServer) CreateRole ¶ added in v0.2.0
func (UnimplementedRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*Role, error)
func (UnimplementedRoleServiceServer) DeleteRole ¶ added in v0.2.0
func (UnimplementedRoleServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*Role, error)
func (UnimplementedRoleServiceServer) DescribeRole ¶ added in v0.2.0
func (UnimplementedRoleServiceServer) DescribeRole(context.Context, *DescribeRoleRequest) (*Role, error)
func (UnimplementedRoleServiceServer) QueryRole ¶ added in v0.2.0
func (UnimplementedRoleServiceServer) QueryRole(context.Context, *QueryRoleRequest) (*Set, error)
type UnsafeRoleServiceServer ¶ added in v0.2.0
type UnsafeRoleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRoleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RoleServiceServer will result in compilation errors.