aclclient

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: LGPL-3.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 Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an ACL store client.

func New

func New(p NewParams) *Client

New returns a new client.

func (*Client) Add

func (c *Client) Add(ctx context.Context, name string, users []string) error

Add updates the contents of the given ACL to include the given user list.

func (*Client) Get

func (c *Client) Get(ctx context.Context, name string) ([]string, error)

Get retrieves the contents of the given ACL.

func (*Client) GetACL

func (c *Client) GetACL(ctx context.Context, p *params.GetACLRequest) (*params.GetACLResponse, error)

GetACL returns the members of the ACL with the requested name. Only administrators and members of the meta-ACL for the name may access this endpoint. The meta-ACL for meta-ACLs is "admin".

func (*Client) GetACLs added in v2.1.0

func (c *Client) GetACLs(ctx context.Context, p *params.GetACLsRequest) (*params.GetACLsResponse, error)

GetACLs returns the list of all ACLs. Only administrators may access this endpoint.

func (*Client) ModifyACL

func (c *Client) ModifyACL(ctx context.Context, p *params.ModifyACLRequest) error

ModifyACL modifies the members of the ACL with the requested name. Only administrators and members of the meta-ACL for the name may access this endpoint. The meta-ACL for meta-ACLs is "admin".

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, name string, users []string) error

Remove updates the contents of the given ACL to remove those in the given user list.

func (*Client) Set

func (c *Client) Set(ctx context.Context, name string, users []string) error

Set updates the contents of the given ACL to the given user list.

func (*Client) SetACL

func (c *Client) SetACL(ctx context.Context, p *params.SetACLRequest) error

SetACL sets the members of the ACL with the requested name. Only administrators and members of the meta-ACL for the name may access this endpoint. The meta-ACL for meta-ACLs is "admin".

type NewParams

type NewParams struct {
	// BaseURL holds the URL prefix of all the endpoints in the ACL store.
	BaseURL string
	// Doer is used to make HTTP requests to the ACL store.
	Doer httprequest.Doer
}

NewParams holds the parameters for creating a new client.

Jump to

Keyboard shortcuts

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