Documentation ¶
Index ¶
- Variables
- type AllowedMethod
- func (*AllowedMethod) Descriptor() ([]byte, []int)deprecated
- func (x *AllowedMethod) GetName() string
- func (x *AllowedMethod) GetScope() Scope
- func (*AllowedMethod) ProtoMessage()
- func (x *AllowedMethod) ProtoReflect() protoreflect.Message
- func (x *AllowedMethod) Reset()
- func (x *AllowedMethod) String() string
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetRoleBindings() []*RoleBinding
- func (x *Config) GetRoles() []*Role
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (c *Config) Validate() error
- type Role
- func (*Role) Descriptor() ([]byte, []int)deprecated
- func (x *Role) GetAllowedMethods() []*AllowedMethod
- func (x *Role) GetId() string
- func (x *Role) GetService() string
- func (*Role) ProtoMessage()
- func (x *Role) ProtoReflect() protoreflect.Message
- func (x *Role) Reset()
- func (x *Role) String() string
- type RoleBinding
- func (*RoleBinding) Descriptor() ([]byte, []int)deprecated
- func (x *RoleBinding) GetId() string
- func (x *RoleBinding) GetRoleId() string
- func (x *RoleBinding) GetUsers() []string
- func (*RoleBinding) ProtoMessage()
- func (x *RoleBinding) ProtoReflect() protoreflect.Message
- func (x *RoleBinding) Reset()
- func (x *RoleBinding) String() string
- type Scope
- type ScopeOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Scope_name = map[int32]string{ 0: "NONE", 1: "CURRENT_USER", 2: "ALL_USERS", } Scope_value = map[string]int32{ "NONE": 0, "CURRENT_USER": 1, "ALL_USERS": 2, } )
Enum value maps for Scope.
View Source
var (
// optional rbac.v1.ScopeOptions scope = 50000;
E_Scope = &file_github_com_kralicky_jobserver_pkg_apis_rbac_v1_rbac_proto_extTypes[0]
)
Extension fields to descriptorpb.MethodOptions.
View Source
var File_github_com_kralicky_jobserver_pkg_apis_rbac_v1_rbac_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AllowedMethod ¶
type AllowedMethod struct { // The name of the method. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The scope that the method applies to (all users, or current user) Scope *Scope `protobuf:"varint,2,opt,name=scope,proto3,enum=rbac.v1.Scope,oneof" json:"scope,omitempty"` // contains filtered or unexported fields }
func (*AllowedMethod) Descriptor
deprecated
func (*AllowedMethod) Descriptor() ([]byte, []int)
Deprecated: Use AllowedMethod.ProtoReflect.Descriptor instead.
func (*AllowedMethod) GetName ¶
func (x *AllowedMethod) GetName() string
func (*AllowedMethod) GetScope ¶
func (x *AllowedMethod) GetScope() Scope
func (*AllowedMethod) ProtoMessage ¶
func (*AllowedMethod) ProtoMessage()
func (*AllowedMethod) ProtoReflect ¶
func (x *AllowedMethod) ProtoReflect() protoreflect.Message
func (*AllowedMethod) Reset ¶
func (x *AllowedMethod) Reset()
func (*AllowedMethod) String ¶
func (x *AllowedMethod) String() string
type Config ¶
type Config struct { // A list of available roles. Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` // A list of available role bindings. RoleBindings []*RoleBinding `protobuf:"bytes,3,rep,name=role_bindings,json=roleBindings,proto3" json:"role_bindings,omitempty"` // contains filtered or unexported fields }
Describes a complete RBAC configuration.
func (*Config) Descriptor
deprecated
func (*Config) GetRoleBindings ¶
func (x *Config) GetRoleBindings() []*RoleBinding
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Role ¶
type Role struct { // An arbitrary unique identifier for the role. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The service name to which the role applies. Should be qualified to // the full package name of the service, not including '/' separators. // For example, `service Foo` in `package bar.baz` should be "bar.baz.Foo". Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` // A list of methods that the role allows access to. The method names must // not be qualified with the service name. All methods must exist in the // named service. For example, `rpc Bar` in `service Foo` should be "Bar". AllowedMethods []*AllowedMethod `protobuf:"bytes,3,rep,name=allowed_methods,json=allowedMethods,proto3" json:"allowed_methods,omitempty"` // contains filtered or unexported fields }
Describes a role that allows access to methods within a service.
func (*Role) Descriptor
deprecated
func (*Role) GetAllowedMethods ¶
func (x *Role) GetAllowedMethods() []*AllowedMethod
func (*Role) GetService ¶
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶
func (x *Role) ProtoReflect() protoreflect.Message
type RoleBinding ¶
type RoleBinding struct { // An arbitrary unique identifier for the role binding. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // An existing role id. RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // A list of users (usernames/emails) that the role applies to. Users []string `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
Describes a role binding, associating a single role with one or more users.
func (*RoleBinding) Descriptor
deprecated
func (*RoleBinding) Descriptor() ([]byte, []int)
Deprecated: Use RoleBinding.ProtoReflect.Descriptor instead.
func (*RoleBinding) GetId ¶
func (x *RoleBinding) GetId() string
func (*RoleBinding) GetRoleId ¶
func (x *RoleBinding) GetRoleId() string
func (*RoleBinding) GetUsers ¶
func (x *RoleBinding) GetUsers() []string
func (*RoleBinding) ProtoMessage ¶
func (*RoleBinding) ProtoMessage()
func (*RoleBinding) ProtoReflect ¶
func (x *RoleBinding) ProtoReflect() protoreflect.Message
func (*RoleBinding) Reset ¶
func (x *RoleBinding) Reset()
func (*RoleBinding) String ¶
func (x *RoleBinding) String() string
type Scope ¶
type Scope int32
func (Scope) Descriptor ¶
func (Scope) Descriptor() protoreflect.EnumDescriptor
func (Scope) EnumDescriptor
deprecated
func (Scope) Number ¶
func (x Scope) Number() protoreflect.EnumNumber
func (Scope) Type ¶
func (Scope) Type() protoreflect.EnumType
type ScopeOptions ¶
type ScopeOptions struct { // Whether scope semantics are enabled for this method. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // contains filtered or unexported fields }
func (*ScopeOptions) Descriptor
deprecated
func (*ScopeOptions) Descriptor() ([]byte, []int)
Deprecated: Use ScopeOptions.ProtoReflect.Descriptor instead.
func (*ScopeOptions) GetEnabled ¶
func (x *ScopeOptions) GetEnabled() bool
func (*ScopeOptions) ProtoMessage ¶
func (*ScopeOptions) ProtoMessage()
func (*ScopeOptions) ProtoReflect ¶
func (x *ScopeOptions) ProtoReflect() protoreflect.Message
func (*ScopeOptions) Reset ¶
func (x *ScopeOptions) Reset()
func (*ScopeOptions) String ¶
func (x *ScopeOptions) String() string
Click to show internal directories.
Click to hide internal directories.