policy

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*httpclient.Client
	// contains filtered or unexported fields
}

func NewDefault

func NewDefault() *Client

func (*Client) CreateOrUpdateRoleBinding

func (c *Client) CreateOrUpdateRoleBinding(projectName string, roleBinding *RoleBinding) error

func (*Client) CreateOrUpdateSystemRoleBinding

func (c *Client) CreateOrUpdateSystemRoleBinding(roleBinding *RoleBinding) error

func (*Client) CreatePolicies added in v1.10.0

func (c *Client) CreatePolicies(ns string, request CreatePoliciesArgs) error

func (*Client) CreatePolicyBinding added in v1.10.0

func (c *Client) CreatePolicyBinding(projectName string, policyBindings []*PolicyBinding) error

func (*Client) CreatePresetRole added in v1.10.0

func (c *Client) CreatePresetRole(name string, role *Role) error

func (*Client) DeletePolicies added in v1.10.0

func (c *Client) DeletePolicies(ns string, request DeletePoliciesArgs) error

func (*Client) DeletePolicyBindings added in v1.10.0

func (c *Client) DeletePolicyBindings(names []string, projectName string) error

func (*Client) DeleteRoleBinding

func (c *Client) DeleteRoleBinding(name string, projectName string) error

func (*Client) DeleteRoleBindings

func (c *Client) DeleteRoleBindings(names []string, projectName string) error

func (*Client) DeleteRoles

func (c *Client) DeleteRoles(names []string, projectName string) error

func (*Client) GetPolicies added in v1.10.0

func (c *Client) GetPolicies(names string) ([]*types.Policy, error)

func (*Client) Healthz added in v1.7.1

func (c *Client) Healthz() error

func (*Client) ListRoleBindings

func (c *Client) ListRoleBindings(projectName string) ([]*RoleBinding, error)

func (*Client) UpdatePolicy added in v1.10.0

func (c *Client) UpdatePolicy(ns string, policy *types.Policy) error

type CreatePoliciesArgs added in v1.10.0

type CreatePoliciesArgs struct {
	Policies []*types.Policy `json:"policies"`
}

type DeletePoliciesArgs added in v1.10.0

type DeletePoliciesArgs struct {
	Names []string `json:"names"`
}

type NameArgs

type NameArgs struct {
	Names []string `json:"names"`
}

type PolicyBinding added in v1.10.0

type PolicyBinding struct {
	Name   string               `json:"name"`
	UID    string               `json:"uid"`
	Policy string               `json:"policy"`
	Preset bool                 `json:"preset"`
	Type   setting.ResourceType `json:"type"`
}

type Role

type Role struct {
	Name  string               `json:"name"`
	Type  setting.ResourceType `json:"type"`
	Desc  string               `json:"desc"`
	Rules []*struct {
		Verbs           []string               `json:"verbs"`
		Resources       []string               `json:"resources"`
		Kind            string                 `json:"kind"`
		MatchAttributes []types.MatchAttribute `json:"match_attributes,omitempty"`
	} `json:"rules"`
}

type RoleBinding

type RoleBinding struct {
	Name   string               `json:"name"`
	UID    string               `json:"uid"`
	Role   string               `json:"role"`
	Preset bool                 `json:"preset"`
	Type   setting.ResourceType `json:"type"`
}

Jump to

Keyboard shortcuts

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