policy

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	ResourceType    string       `json:"resourceType,omitempty"`
	IDRegex         string       `json:"idRegex,omitempty"`
	MatchAttributes []*Attribute `json:"matchAttributes,omitempty"`
}

type Attribute added in v1.7.1

type Attribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Client

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

func NewDefault

func NewDefault() *Client

func NewWithRetry added in v1.8.0

func NewWithRetry() *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) Healthz added in v1.7.1

func (c *Client) Healthz() 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