Documentation ¶
Index ¶
- Constants
- Variables
- func HttpEntry() *http.EntrySet
- func PermissionHash(namesapce string, perm *CreatePermssionRequest) string
- func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer)
- type AddPermissionToRoleRequest
- func (*AddPermissionToRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddPermissionToRoleRequest) GetPermissions() []*CreatePermssionRequest
- func (x *AddPermissionToRoleRequest) GetRoleId() string
- func (req *AddPermissionToRoleRequest) Length() int
- func (*AddPermissionToRoleRequest) ProtoMessage()
- func (x *AddPermissionToRoleRequest) ProtoReflect() protoreflect.Message
- func (x *AddPermissionToRoleRequest) Reset()
- func (x *AddPermissionToRoleRequest) String() string
- func (req *AddPermissionToRoleRequest) Validate() error
- type CreatePermssionRequest
- func (*CreatePermssionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePermssionRequest) GetEffect() EffectType
- func (x *CreatePermssionRequest) GetLabelKey() string
- func (x *CreatePermssionRequest) GetLabelValues() []string
- func (x *CreatePermssionRequest) GetMatchAll() bool
- func (x *CreatePermssionRequest) GetResourceName() string
- func (x *CreatePermssionRequest) GetServiceId() string
- func (*CreatePermssionRequest) ProtoMessage()
- func (x *CreatePermssionRequest) ProtoReflect() protoreflect.Message
- func (x *CreatePermssionRequest) Reset()
- func (x *CreatePermssionRequest) String() string
- func (p *CreatePermssionRequest) Validate() error
- type CreateRoleRequest
- func (*CreateRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRoleRequest) GetDescription() string
- func (x *CreateRoleRequest) GetName() string
- func (x *CreateRoleRequest) GetPageMarked() string
- func (x *CreateRoleRequest) GetPermissions() []*CreatePermssionRequest
- 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
- func (*DeleteRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRoleRequest) GetDeletePolicy() bool
- func (x *DeleteRoleRequest) GetId() string
- func (*DeleteRoleRequest) ProtoMessage()
- func (x *DeleteRoleRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRoleRequest) Reset()
- func (x *DeleteRoleRequest) String() string
- type DescribePermissionRequest
- func (*DescribePermissionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescribePermissionRequest) GetId() string
- func (*DescribePermissionRequest) ProtoMessage()
- func (x *DescribePermissionRequest) ProtoReflect() protoreflect.Message
- func (x *DescribePermissionRequest) Reset()
- func (x *DescribePermissionRequest) String() string
- func (req *DescribePermissionRequest) Validate() error
- 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) GetCreateAt() int64
- func (x *Permission) GetCreater() string
- func (x *Permission) GetDesc() string
- func (x *Permission) GetEffect() EffectType
- func (x *Permission) GetId() string
- func (x *Permission) GetLabelKey() string
- func (x *Permission) GetLabelValues() []string
- func (x *Permission) GetMatchAll() bool
- func (x *Permission) GetResourceName() string
- func (x *Permission) GetRoleId() string
- func (x *Permission) GetScope() 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
- 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 QueryPermissionRequest
- func (*QueryPermissionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryPermissionRequest) GetPage() *page.PageRequest
- func (x *QueryPermissionRequest) GetRoleId() string
- func (x *QueryPermissionRequest) GetSkipItmes() bool
- func (*QueryPermissionRequest) ProtoMessage()
- func (x *QueryPermissionRequest) ProtoReflect() protoreflect.Message
- func (x *QueryPermissionRequest) Reset()
- func (x *QueryPermissionRequest) String() string
- func (req *QueryPermissionRequest) Validate() error
- type QueryRoleRequest
- func (*QueryRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRoleRequest) GetPage() *page.PageRequest
- func (x *QueryRoleRequest) GetType() RoleType
- func (*QueryRoleRequest) ProtoMessage()
- func (x *QueryRoleRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRoleRequest) Reset()
- func (x *QueryRoleRequest) String() string
- func (req *QueryRoleRequest) Validate() error
- type RemovePermissionFromRoleRequest
- func (*RemovePermissionFromRoleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemovePermissionFromRoleRequest) GetPermissionId() []string
- func (x *RemovePermissionFromRoleRequest) GetRemoveAll() bool
- func (x *RemovePermissionFromRoleRequest) GetRoleId() string
- func (*RemovePermissionFromRoleRequest) ProtoMessage()
- func (x *RemovePermissionFromRoleRequest) ProtoReflect() protoreflect.Message
- func (x *RemovePermissionFromRoleRequest) Reset()
- func (x *RemovePermissionFromRoleRequest) String() string
- func (req *RemovePermissionFromRoleRequest) 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) GetPageMarked() string
- func (x *Role) GetPermissions() []*Permission
- func (x *Role) GetScope() string
- 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 (s *Set) RoleNames() []string
- func (x *Set) String() string
- type UnimplementedRoleServiceServer
- func (UnimplementedRoleServiceServer) AddPermissionToRole(context.Context, *AddPermissionToRoleRequest) (*PermissionSet, error)
- func (UnimplementedRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*Role, error)
- func (UnimplementedRoleServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*Role, error)
- func (UnimplementedRoleServiceServer) DescribePermission(context.Context, *DescribePermissionRequest) (*Permission, error)
- func (UnimplementedRoleServiceServer) DescribeRole(context.Context, *DescribeRoleRequest) (*Role, error)
- func (UnimplementedRoleServiceServer) QueryPermission(context.Context, *QueryPermissionRequest) (*PermissionSet, error)
- func (UnimplementedRoleServiceServer) QueryRole(context.Context, *QueryRoleRequest) (*Set, error)
- func (UnimplementedRoleServiceServer) RemovePermissionFromRole(context.Context, *RemovePermissionFromRoleRequest) (*PermissionSet, error)
- func (UnimplementedRoleServiceServer) UpdatePermission(context.Context, *UpdatePermissionRequest) (*Permission, error)
- type UnsafeRoleServiceServer
- type UpdatePermissionRequest
- func (*UpdatePermissionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePermissionRequest) GetId() string
- func (x *UpdatePermissionRequest) GetLabelKey() string
- func (x *UpdatePermissionRequest) GetLabelValues() []string
- func (x *UpdatePermissionRequest) GetMatchAll() bool
- func (*UpdatePermissionRequest) ProtoMessage()
- func (x *UpdatePermissionRequest) ProtoReflect() protoreflect.Message
- func (x *UpdatePermissionRequest) Reset()
- func (x *UpdatePermissionRequest) String() string
- func (req *UpdatePermissionRequest) Validate() error
Constants ¶
const ( // AdminRoleName 管理员角色名称, 系统初始化时创建 AdminRoleName = "admin" // VisitorRoleName 访客角色名称, 系统初始化时创建 VisitorRoleName = "visitor" )
const (
// RoleMaxPermission 一个角色允许添加的最大权限数
RoleMaxPermission = 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 PermissionHash ¶ added in v0.2.8
func PermissionHash(namesapce string, perm *CreatePermssionRequest) string
func RegisterRoleServiceServer ¶ added in v0.2.0
func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer)
Types ¶
type AddPermissionToRoleRequest ¶ added in v0.2.8
type AddPermissionToRoleRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id" validate:"required,lte=64"` Permissions []*CreatePermssionRequest `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions" validate:"required"` // contains filtered or unexported fields }
func NewAddPermissionToRoleRequest ¶ added in v0.2.8
func NewAddPermissionToRoleRequest() *AddPermissionToRoleRequest
NewAddPermissionToRoleRequest todo
func (*AddPermissionToRoleRequest) Descriptor
deprecated
added in
v0.2.8
func (*AddPermissionToRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddPermissionToRoleRequest.ProtoReflect.Descriptor instead.
func (*AddPermissionToRoleRequest) GetPermissions ¶ added in v0.2.8
func (x *AddPermissionToRoleRequest) GetPermissions() []*CreatePermssionRequest
func (*AddPermissionToRoleRequest) GetRoleId ¶ added in v0.2.8
func (x *AddPermissionToRoleRequest) GetRoleId() string
func (*AddPermissionToRoleRequest) Length ¶ added in v0.2.8
func (req *AddPermissionToRoleRequest) Length() int
func (*AddPermissionToRoleRequest) ProtoMessage ¶ added in v0.2.8
func (*AddPermissionToRoleRequest) ProtoMessage()
func (*AddPermissionToRoleRequest) ProtoReflect ¶ added in v0.2.8
func (x *AddPermissionToRoleRequest) ProtoReflect() protoreflect.Message
func (*AddPermissionToRoleRequest) Reset ¶ added in v0.2.8
func (x *AddPermissionToRoleRequest) Reset()
func (*AddPermissionToRoleRequest) String ¶ added in v0.2.8
func (x *AddPermissionToRoleRequest) String() string
func (*AddPermissionToRoleRequest) Validate ¶ added in v0.2.8
func (req *AddPermissionToRoleRequest) Validate() error
type CreatePermssionRequest ¶ added in v0.2.8
type CreatePermssionRequest 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 }
func NewDefaultPermission ¶
func NewDefaultPermission() *CreatePermssionRequest
NewDefaultPermission todo
func (*CreatePermssionRequest) Descriptor
deprecated
added in
v0.2.8
func (*CreatePermssionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreatePermssionRequest.ProtoReflect.Descriptor instead.
func (*CreatePermssionRequest) GetEffect ¶ added in v0.2.8
func (x *CreatePermssionRequest) GetEffect() EffectType
func (*CreatePermssionRequest) GetLabelKey ¶ added in v0.2.8
func (x *CreatePermssionRequest) GetLabelKey() string
func (*CreatePermssionRequest) GetLabelValues ¶ added in v0.2.8
func (x *CreatePermssionRequest) GetLabelValues() []string
func (*CreatePermssionRequest) GetMatchAll ¶ added in v0.2.8
func (x *CreatePermssionRequest) GetMatchAll() bool
func (*CreatePermssionRequest) GetResourceName ¶ added in v0.2.8
func (x *CreatePermssionRequest) GetResourceName() string
func (*CreatePermssionRequest) GetServiceId ¶ added in v0.2.8
func (x *CreatePermssionRequest) GetServiceId() string
func (*CreatePermssionRequest) ProtoMessage ¶ added in v0.2.8
func (*CreatePermssionRequest) ProtoMessage()
func (*CreatePermssionRequest) ProtoReflect ¶ added in v0.2.8
func (x *CreatePermssionRequest) ProtoReflect() protoreflect.Message
func (*CreatePermssionRequest) Reset ¶ added in v0.2.8
func (x *CreatePermssionRequest) Reset()
func (*CreatePermssionRequest) String ¶ added in v0.2.8
func (x *CreatePermssionRequest) String() string
func (*CreatePermssionRequest) Validate ¶ added in v0.2.8
func (p *CreatePermssionRequest) Validate() error
Validate todo
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"` // 角色关联的page PageMarked string `protobuf:"bytes,4,opt,name=page_marked,json=pageMarked,proto3" json:"page_marked" bson:"page_marked" validate:"lte=400"` // 读权限 Permissions []*CreatePermssionRequest `protobuf:"bytes,9,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) GetPageMarked ¶ added in v0.2.8
func (x *CreateRoleRequest) GetPageMarked() string
func (*CreateRoleRequest) GetPermissions ¶ added in v0.2.0
func (x *CreateRoleRequest) GetPermissions() []*CreatePermssionRequest
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" validate:"required,lte=64"` DeletePolicy bool `protobuf:"varint,2,opt,name=delete_policy,json=deletePolicy,proto3" json:"delete_policy"` // contains filtered or unexported fields }
DeleteRoleRequest role删除
func NewDeleteRoleWithID ¶ added in v0.2.5
func NewDeleteRoleWithID(id string) *DeleteRoleRequest
NewDeleteRoleWithID todo
func (*DeleteRoleRequest) Descriptor
deprecated
added in
v0.2.0
func (*DeleteRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRoleRequest.ProtoReflect.Descriptor instead.
func (*DeleteRoleRequest) GetDeletePolicy ¶ added in v0.2.5
func (x *DeleteRoleRequest) GetDeletePolicy() bool
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 DescribePermissionRequest ¶ added in v0.2.8
type DescribePermissionRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` // contains filtered or unexported fields }
DescribeRoleRequest role详情
func NewDescribePermissionRequestWithID ¶ added in v0.2.8
func NewDescribePermissionRequestWithID(id string) *DescribePermissionRequest
func (*DescribePermissionRequest) Descriptor
deprecated
added in
v0.2.8
func (*DescribePermissionRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribePermissionRequest.ProtoReflect.Descriptor instead.
func (*DescribePermissionRequest) GetId ¶ added in v0.2.8
func (x *DescribePermissionRequest) GetId() string
func (*DescribePermissionRequest) ProtoMessage ¶ added in v0.2.8
func (*DescribePermissionRequest) ProtoMessage()
func (*DescribePermissionRequest) ProtoReflect ¶ added in v0.2.8
func (x *DescribePermissionRequest) ProtoReflect() protoreflect.Message
func (*DescribePermissionRequest) Reset ¶ added in v0.2.8
func (x *DescribePermissionRequest) Reset()
func (*DescribePermissionRequest) String ¶ added in v0.2.8
func (x *DescribePermissionRequest) String() string
func (*DescribePermissionRequest) Validate ¶ added in v0.2.8
func (req *DescribePermissionRequest) Validate() error
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 { // id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // 关联角色ID RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id" bson:"role_id"` // 创建时间 CreateAt int64 `protobuf:"varint,3,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"` // 创建人 Creater string `protobuf:"bytes,4,opt,name=creater,proto3" json:"creater" bson:"creater"` // 效力 Effect EffectType `protobuf:"varint,5,opt,name=effect,proto3,enum=keyauth.role.EffectType" json:"effect" bson:"effect"` // 服务ID ServiceId string `protobuf:"bytes,6,opt,name=service_id,json=serviceId,proto3" json:"service_id" bson:"service_id"` // 资源列表 ResourceName string `protobuf:"bytes,7,opt,name=resource_name,json=resourceName,proto3" json:"resource_name" bson:"resource_name"` // 维度 LabelKey string `protobuf:"bytes,8,opt,name=label_key,json=labelKey,proto3" json:"label_key" bson:"label_key"` // 适配所有值 MatchAll bool `protobuf:"varint,9,opt,name=match_all,json=matchAll,proto3" json:"match_all" bson:"match_all"` // 标识值 LabelValues []string `protobuf:"bytes,10,rep,name=label_values,json=labelValues,proto3" json:"label_values" bson:"label_values"` // 范围, 角色范围限制, 由策略引擎动态补充 Scope string `protobuf:"bytes,11,opt,name=scope,proto3" json:"scope" bson:"-"` // 权限描述 Desc string `protobuf:"bytes,12,opt,name=desc,proto3" json:"desc" bson:"desc"` // contains filtered or unexported fields }
Permission 权限
func NewDeaultPermission ¶ added in v0.2.8
func NewDeaultPermission() *Permission
func NewPermission ¶ added in v0.2.8
func NewPermission(roleID, creater string, perms []*CreatePermssionRequest) []*Permission
func (*Permission) Descriptor
deprecated
added in
v0.2.0
func (*Permission) Descriptor() ([]byte, []int)
Deprecated: Use Permission.ProtoReflect.Descriptor instead.
func (*Permission) GetCreateAt ¶ added in v0.2.8
func (x *Permission) GetCreateAt() int64
func (*Permission) GetCreater ¶ added in v0.2.8
func (x *Permission) GetCreater() string
func (*Permission) GetDesc ¶ added in v0.3.2
func (x *Permission) GetDesc() string
func (*Permission) GetEffect ¶ added in v0.2.0
func (x *Permission) GetEffect() EffectType
func (*Permission) GetId ¶ added in v0.2.8
func (x *Permission) GetId() string
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) GetRoleId ¶ added in v0.2.8
func (x *Permission) GetRoleId() string
func (*Permission) GetScope ¶ added in v0.3.2
func (x *Permission) GetScope() 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 QueryPermissionRequest ¶ added in v0.2.8
type QueryPermissionRequest struct { Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"` RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` SkipItmes bool `protobuf:"varint,3,opt,name=skip_itmes,json=skipItmes,proto3" json:"skip_itmes,omitempty"` // contains filtered or unexported fields }
func NewQueryPermissionRequest ¶ added in v0.2.8
func NewQueryPermissionRequest(pageReq *request.PageRequest) *QueryPermissionRequest
NewQueryPermissionRequest todo
func NewQueryPermissionRequestFromHTTP ¶ added in v0.2.8
func NewQueryPermissionRequestFromHTTP(r *http.Request) *QueryPermissionRequest
NewQueryPermissionRequestFromHTTP 列表查询请求
func (*QueryPermissionRequest) Descriptor
deprecated
added in
v0.2.8
func (*QueryPermissionRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryPermissionRequest.ProtoReflect.Descriptor instead.
func (*QueryPermissionRequest) GetPage ¶ added in v0.2.8
func (x *QueryPermissionRequest) GetPage() *page.PageRequest
func (*QueryPermissionRequest) GetRoleId ¶ added in v0.2.8
func (x *QueryPermissionRequest) GetRoleId() string
func (*QueryPermissionRequest) GetSkipItmes ¶ added in v0.2.8
func (x *QueryPermissionRequest) GetSkipItmes() bool
func (*QueryPermissionRequest) ProtoMessage ¶ added in v0.2.8
func (*QueryPermissionRequest) ProtoMessage()
func (*QueryPermissionRequest) ProtoReflect ¶ added in v0.2.8
func (x *QueryPermissionRequest) ProtoReflect() protoreflect.Message
func (*QueryPermissionRequest) Reset ¶ added in v0.2.8
func (x *QueryPermissionRequest) Reset()
func (*QueryPermissionRequest) String ¶ added in v0.2.8
func (x *QueryPermissionRequest) String() string
func (*QueryPermissionRequest) Validate ¶ added in v0.2.8
func (req *QueryPermissionRequest) Validate() error
type QueryRoleRequest ¶
type QueryRoleRequest struct { Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"` Type RoleType `protobuf:"varint,2,opt,name=type,proto3,enum=keyauth.role.RoleType" json:"type,omitempty"` // 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) 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 RemovePermissionFromRoleRequest ¶ added in v0.2.8
type RemovePermissionFromRoleRequest struct { RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id" validate:"required,lte=64"` RemoveAll bool `protobuf:"varint,2,opt,name=remove_all,json=removeAll,proto3" json:"remove_all"` PermissionId []string `protobuf:"bytes,3,rep,name=permission_id,json=permissionId,proto3" json:"permission_id"` // contains filtered or unexported fields }
func NewRemovePermissionFromRoleRequest ¶ added in v0.2.8
func NewRemovePermissionFromRoleRequest() *RemovePermissionFromRoleRequest
NewRemovePermissionFromRoleRequest todo
func (*RemovePermissionFromRoleRequest) Descriptor
deprecated
added in
v0.2.8
func (*RemovePermissionFromRoleRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemovePermissionFromRoleRequest.ProtoReflect.Descriptor instead.
func (*RemovePermissionFromRoleRequest) GetPermissionId ¶ added in v0.2.8
func (x *RemovePermissionFromRoleRequest) GetPermissionId() []string
func (*RemovePermissionFromRoleRequest) GetRemoveAll ¶ added in v0.2.8
func (x *RemovePermissionFromRoleRequest) GetRemoveAll() bool
func (*RemovePermissionFromRoleRequest) GetRoleId ¶ added in v0.2.8
func (x *RemovePermissionFromRoleRequest) GetRoleId() string
func (*RemovePermissionFromRoleRequest) ProtoMessage ¶ added in v0.2.8
func (*RemovePermissionFromRoleRequest) ProtoMessage()
func (*RemovePermissionFromRoleRequest) ProtoReflect ¶ added in v0.2.8
func (x *RemovePermissionFromRoleRequest) ProtoReflect() protoreflect.Message
func (*RemovePermissionFromRoleRequest) Reset ¶ added in v0.2.8
func (x *RemovePermissionFromRoleRequest) Reset()
func (*RemovePermissionFromRoleRequest) String ¶ added in v0.2.8
func (x *RemovePermissionFromRoleRequest) String() string
func (*RemovePermissionFromRoleRequest) Validate ¶ added in v0.2.8
func (req *RemovePermissionFromRoleRequest) Validate() error
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" bson:"create_at"` // 更新时间 UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"` // 角色所属域 Domain string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain" 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" bson:"name"` // 应用简单的描述 Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description" bson:"description"` // 角色关联的page PageMarked string `protobuf:"bytes,10,opt,name=page_marked,json=pageMarked,proto3" json:"page_marked" bson:"page_marked"` // 读权限 Permissions []*Permission `protobuf:"bytes,9,rep,name=permissions,proto3" json:"permissions,omitempty" bson:"-"` // 范围, 角色范围限制, 由策略引擎动态补充 Scope string `protobuf:"bytes,11,opt,name=scope,proto3" json:"scope" bson:"-"` // 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) GetPageMarked ¶ added in v0.2.8
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) QueryPermission(ctx context.Context, in *QueryPermissionRequest, opts ...grpc.CallOption) (*PermissionSet, error) DescribePermission(ctx context.Context, in *DescribePermissionRequest, opts ...grpc.CallOption) (*Permission, error) AddPermissionToRole(ctx context.Context, in *AddPermissionToRoleRequest, opts ...grpc.CallOption) (*PermissionSet, error) RemovePermissionFromRole(ctx context.Context, in *RemovePermissionFromRoleRequest, opts ...grpc.CallOption) (*PermissionSet, error) UpdatePermission(ctx context.Context, in *UpdatePermissionRequest, opts ...grpc.CallOption) (*Permission, 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) QueryPermission(context.Context, *QueryPermissionRequest) (*PermissionSet, error) DescribePermission(context.Context, *DescribePermissionRequest) (*Permission, error) AddPermissionToRole(context.Context, *AddPermissionToRoleRequest) (*PermissionSet, error) RemovePermissionFromRole(context.Context, *RemovePermissionFromRoleRequest) (*PermissionSet, error) UpdatePermission(context.Context, *UpdatePermissionRequest) (*Permission, 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) AddPermissionToRole ¶ added in v0.2.8
func (UnimplementedRoleServiceServer) AddPermissionToRole(context.Context, *AddPermissionToRoleRequest) (*PermissionSet, error)
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) DescribePermission ¶ added in v0.2.8
func (UnimplementedRoleServiceServer) DescribePermission(context.Context, *DescribePermissionRequest) (*Permission, error)
func (UnimplementedRoleServiceServer) DescribeRole ¶ added in v0.2.0
func (UnimplementedRoleServiceServer) DescribeRole(context.Context, *DescribeRoleRequest) (*Role, error)
func (UnimplementedRoleServiceServer) QueryPermission ¶ added in v0.2.8
func (UnimplementedRoleServiceServer) QueryPermission(context.Context, *QueryPermissionRequest) (*PermissionSet, error)
func (UnimplementedRoleServiceServer) QueryRole ¶ added in v0.2.0
func (UnimplementedRoleServiceServer) QueryRole(context.Context, *QueryRoleRequest) (*Set, error)
func (UnimplementedRoleServiceServer) RemovePermissionFromRole ¶ added in v0.2.8
func (UnimplementedRoleServiceServer) RemovePermissionFromRole(context.Context, *RemovePermissionFromRoleRequest) (*PermissionSet, error)
func (UnimplementedRoleServiceServer) UpdatePermission ¶ added in v0.2.8
func (UnimplementedRoleServiceServer) UpdatePermission(context.Context, *UpdatePermissionRequest) (*Permission, 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.
type UpdatePermissionRequest ¶ added in v0.2.8
type UpdatePermissionRequest struct { // permission id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" validate:"required,lte=64"` // 维度 LabelKey string `protobuf:"bytes,2,opt,name=label_key,json=labelKey,proto3" json:"label_key"` // 适配所有值 MatchAll bool `protobuf:"varint,3,opt,name=match_all,json=matchAll,proto3" json:"match_all"` // 标识值 LabelValues []string `protobuf:"bytes,4,rep,name=label_values,json=labelValues,proto3" json:"label_values"` // contains filtered or unexported fields }
func NewUpdatePermissionRequest ¶ added in v0.2.8
func NewUpdatePermissionRequest() *UpdatePermissionRequest
func (*UpdatePermissionRequest) Descriptor
deprecated
added in
v0.2.8
func (*UpdatePermissionRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePermissionRequest.ProtoReflect.Descriptor instead.
func (*UpdatePermissionRequest) GetId ¶ added in v0.2.8
func (x *UpdatePermissionRequest) GetId() string
func (*UpdatePermissionRequest) GetLabelKey ¶ added in v0.2.8
func (x *UpdatePermissionRequest) GetLabelKey() string
func (*UpdatePermissionRequest) GetLabelValues ¶ added in v0.2.8
func (x *UpdatePermissionRequest) GetLabelValues() []string
func (*UpdatePermissionRequest) GetMatchAll ¶ added in v0.2.8
func (x *UpdatePermissionRequest) GetMatchAll() bool
func (*UpdatePermissionRequest) ProtoMessage ¶ added in v0.2.8
func (*UpdatePermissionRequest) ProtoMessage()
func (*UpdatePermissionRequest) ProtoReflect ¶ added in v0.2.8
func (x *UpdatePermissionRequest) ProtoReflect() protoreflect.Message
func (*UpdatePermissionRequest) Reset ¶ added in v0.2.8
func (x *UpdatePermissionRequest) Reset()
func (*UpdatePermissionRequest) String ¶ added in v0.2.8
func (x *UpdatePermissionRequest) String() string
func (*UpdatePermissionRequest) Validate ¶ added in v0.2.8
func (req *UpdatePermissionRequest) Validate() error