roles

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 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
}

func New

func New(c HTTPClient) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)

Create Create new role.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

Delete Delete role.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)

Find Get role configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context) (*IndexResponse, error)

Index Role index.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)

Update Update an existing role.

type CreateRequest

type CreateRequest struct {
	Roleid string `url:"roleid",json:"roleid"`

	// The following parameters are optional
	Privs *string `url:"privs,omitempty",json:"privs,omitempty"`
}

type CreateResponse

type CreateResponse map[string]interface{}

type DeleteRequest

type DeleteRequest struct {
	Roleid string `url:"roleid",json:"roleid"`
}

type DeleteResponse

type DeleteResponse map[string]interface{}

type FindRequest

type FindRequest struct {
	Roleid string `url:"roleid",json:"roleid"`
}

type FindResponse

type FindResponse map[string]interface{}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse []*struct {
	Roleid string `url:"roleid",json:"roleid"`

	// The following parameters are optional
	Privs   *string `url:"privs,omitempty",json:"privs,omitempty"`
	Special *bool   `url:"special,omitempty",json:"special,omitempty"`
}

type UpdateRequest

type UpdateRequest struct {
	Roleid string `url:"roleid",json:"roleid"`

	// The following parameters are optional
	Append *bool   `url:"append,omitempty",json:"append,omitempty"`
	Privs  *string `url:"privs,omitempty",json:"privs,omitempty"`
}

type UpdateResponse

type UpdateResponse map[string]interface{}

Jump to

Keyboard shortcuts

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