Documentation ¶
Index ¶
- func NewEmptyPolicy(namespace string) *authorizationapi.Policy
- func NewREST(registry Registry) apiserver.RESTStorage
- type REST
- func (r *REST) Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error)
- func (r *REST) Delete(ctx kapi.Context, name string) (runtime.Object, error)
- func (r *REST) Get(ctx kapi.Context, name string) (runtime.Object, error)
- func (r *REST) List(ctx kapi.Context, label labels.Selector, field fields.Selector) (runtime.Object, error)
- func (r *REST) New() runtime.Object
- func (*REST) NewList() runtime.Object
- func (r *REST) Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error)
- type Registry
- type VirtualRegistry
- func (m *VirtualRegistry) CreateRole(ctx kapi.Context, role *authorizationapi.Role) error
- func (m *VirtualRegistry) DeleteRole(ctx kapi.Context, name string) error
- func (m *VirtualRegistry) EnsurePolicy(ctx kapi.Context) (*authorizationapi.Policy, error)
- func (m *VirtualRegistry) GetRole(ctx kapi.Context, name string) (*authorizationapi.Role, error)
- func (m *VirtualRegistry) ListRoles(ctx kapi.Context, label labels.Selector, field fields.Selector) (*authorizationapi.RoleList, error)
- func (m *VirtualRegistry) UpdateRole(ctx kapi.Context, role *authorizationapi.Role) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmptyPolicy ¶
func NewEmptyPolicy(namespace string) *authorizationapi.Policy
func NewREST ¶
func NewREST(registry Registry) apiserver.RESTStorage
NewREST creates a new REST for policies.
Types ¶
type REST ¶
type REST struct {
// contains filtered or unexported fields
}
REST implements the RESTStorage interface in terms of an Registry.
type Registry ¶ added in v0.4.2
type Registry interface { // ListRoles obtains list of policyRoles that match a selector. ListRoles(ctx kapi.Context, label labels.Selector, field fields.Selector) (*authorizationapi.RoleList, error) // GetRole retrieves a specific policyRole. GetRole(ctx kapi.Context, id string) (*authorizationapi.Role, error) // CreateRole creates a new policyRole. CreateRole(ctx kapi.Context, policyRole *authorizationapi.Role) error // UpdateRole updates a policyRole. UpdateRole(ctx kapi.Context, policyRole *authorizationapi.Role) error // DeleteRole deletes a policyRole. DeleteRole(ctx kapi.Context, id string) error }
Registry is an interface for things that know how to store Roles.
func NewVirtualRegistry ¶ added in v0.4.2
func NewVirtualRegistry(policyRegistry policyregistry.Registry) Registry
NewVirtualRegistry creates a new REST for policies.
type VirtualRegistry ¶ added in v0.4.2
type VirtualRegistry struct {
// contains filtered or unexported fields
}
func (*VirtualRegistry) CreateRole ¶ added in v0.4.2
func (m *VirtualRegistry) CreateRole(ctx kapi.Context, role *authorizationapi.Role) error
func (*VirtualRegistry) DeleteRole ¶ added in v0.4.2
func (m *VirtualRegistry) DeleteRole(ctx kapi.Context, name string) error
func (*VirtualRegistry) EnsurePolicy ¶ added in v0.4.2
func (m *VirtualRegistry) EnsurePolicy(ctx kapi.Context) (*authorizationapi.Policy, error)
EnsurePolicy returns the policy object for the specified namespace. If one does not exist, it is created for you. Permission to create, update, or delete roles in a namespace implies the ability to create a Policy object itself.
func (*VirtualRegistry) GetRole ¶ added in v0.4.2
func (m *VirtualRegistry) GetRole(ctx kapi.Context, name string) (*authorizationapi.Role, error)
func (*VirtualRegistry) ListRoles ¶ added in v0.4.2
func (m *VirtualRegistry) ListRoles(ctx kapi.Context, label labels.Selector, field fields.Selector) (*authorizationapi.RoleList, error)
TODO either add selector for fields ot eliminate the option
func (*VirtualRegistry) UpdateRole ¶ added in v0.4.2
func (m *VirtualRegistry) UpdateRole(ctx kapi.Context, role *authorizationapi.Role) error
Click to show internal directories.
Click to hide internal directories.