permissions

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorMissingObjectID     = errors.New("objectID cannot be empty")
	ErrorMissingAccessorID   = errors.New("accessorID cannot be empty")
	ErrorMissingAccessorType = errors.New("accessorType cannot be empty")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(client *rest.Client) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, objectID string, body []byte) (api.Response, error)

func (*Client) DeleteAccessor

func (c *Client) DeleteAccessor(ctx context.Context, objectID string, accessorType string, accessorID string) (api.Response, error)

func (*Client) DeleteAllUsersAccessor

func (c *Client) DeleteAllUsersAccessor(ctx context.Context, objectID string) (api.Response, error)

func (*Client) GetAccessor

func (c *Client) GetAccessor(ctx context.Context, objectID string, accessorType string, accessorID string) (api.Response, error)

func (*Client) GetAllAccessors

func (c *Client) GetAllAccessors(ctx context.Context, objectID string) (api.Response, error)

func (*Client) GetAllUsersAccessor

func (c *Client) GetAllUsersAccessor(ctx context.Context, objectID string) (api.Response, error)

func (*Client) UpdateAccessor

func (c *Client) UpdateAccessor(ctx context.Context, objectID string, accessorType string, accessorID string, body []byte) (api.Response, error)

func (*Client) UpdateAllUsersAccessor

func (c *Client) UpdateAllUsersAccessor(ctx context.Context, objectID string, body []byte) (api.Response, error)

type ClientOperation

type ClientOperation string
const (
	GET    ClientOperation = "get"
	POST   ClientOperation = "create"
	PUT    ClientOperation = "update"
	DELETE ClientOperation = "delete"
)

type ErrorPermissions

type ErrorPermissions struct {
	Wrapped   error
	Operation ClientOperation
}

func (ErrorPermissions) Error

func (e ErrorPermissions) Error() string

func (ErrorPermissions) Unwrap

func (e ErrorPermissions) Unwrap() error

Jump to

Keyboard shortcuts

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