policy

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRule

type ActionRule struct {
	Method   string `json:"method"`
	Endpoint string `json:"endpoint"`
}

type Client

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

func New

func New() *Client

func NewDefault

func NewDefault() *Client

func (*Client) CreateOrUpdatePolicy

func (c *Client) CreateOrUpdatePolicy(p *Policy) error

func (*Client) CreateOrUpdateRoleBinding

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

func (*Client) CreateOrUpdateSystemRoleBinding

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

func (*Client) CreatePublicRole

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

func (*Client) CreateSystemRole

func (c *Client) CreateSystemRole(name string, role *Role) 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) ListRoleBindings

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

type NameArgs

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

type Policy

type Policy struct {
	Resource    string  `json:"resource"`
	Alias       string  `json:"alias"`
	Description string  `json:"description"`
	Rules       []*Rule `json:"rules"`
}

type Role

type Role struct {
	Name  string `json:"name"`
	Rules []*struct {
		Verbs     []string `json:"verbs"`
		Resources []string `json:"resources"`
		Kind      string   `json:"kind"`
	} `json:"rules"`
}

type RoleBinding

type RoleBinding struct {
	Name   string `json:"name"`
	UID    string `json:"uid"`
	Role   string `json:"role"`
	Public bool   `json:"public"`
}

type Rule

type Rule struct {
	Action      string        `json:"action"`
	Alias       string        `json:"alias"`
	Description string        `json:"description"`
	Rules       []*ActionRule `json:"rules"`
}

Jump to

Keyboard shortcuts

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