rbacv1

package
v0.0.0-...-9bfccdf Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetRoleBindings

func (x *Config) GetRoleBindings() []*RoleBinding

func (*Config) GetRoles

func (x *Config) GetRoles() []*Role

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (c *Config) Validate() error

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetAllowedMethods

func (x *Role) GetAllowedMethods() []*AllowedMethod

func (*Role) GetId

func (x *Role) GetId() string

func (*Role) GetService

func (x *Role) GetService() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

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

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

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
const (
	Scope_NONE         Scope = 0 // the method does not have scope semantics
	Scope_CURRENT_USER Scope = 1 // default, allows access to jobs created by the current user
	Scope_ALL_USERS    Scope = 2 // allows access to jobs created by any user
)

func (Scope) Descriptor

func (Scope) Descriptor() protoreflect.EnumDescriptor

func (Scope) Enum

func (x Scope) Enum() *Scope

func (Scope) EnumDescriptor deprecated

func (Scope) EnumDescriptor() ([]byte, []int)

Deprecated: Use Scope.Descriptor instead.

func (Scope) Number

func (x Scope) Number() protoreflect.EnumNumber

func (Scope) String

func (x Scope) String() string

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

Jump to

Keyboard shortcuts

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