client

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 7 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 {
	*client.Client
}

func New

func New(url string, opts ...client.ClientOpt) (*Client, error)

Create a new client

func (*Client) Auth

func (c *Client) Auth(ctx context.Context, value string) (*schema.User, error)

func (*Client) CreateToken

func (c *Client) CreateToken(ctx context.Context, user string, meta schema.TokenMeta) (*schema.Token, error)

func (*Client) CreateUser

func (c *Client) CreateUser(ctx context.Context, meta schema.UserMeta) (*schema.User, error)

func (*Client) DeleteToken

func (c *Client) DeleteToken(ctx context.Context, user string, id uint64, force bool) error

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, name string, force bool) error

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context, user string, id uint64) (*schema.Token, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, name string) (*schema.User, error)

func (*Client) ListTokens

func (c *Client) ListTokens(ctx context.Context, user string, opts ...Opt) (*schema.TokenList, error)

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context, opts ...Opt) (*schema.UserList, error)

func (*Client) UpdateToken

func (c *Client) UpdateToken(ctx context.Context, user string, id uint64, meta schema.TokenMeta) (*schema.Token, error)

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, name string, meta schema.UserMeta) (*schema.User, error)

type Opt

type Opt func(*opt) error

An Option to set on the client

func OptSet

func OptSet(k, v string) Opt

func WithForce

func WithForce(v bool) Opt

func WithOffsetLimit

func WithOffsetLimit(offset uint64, limit *uint64) Opt

Set offset and limit

func WithScope

func WithScope(v *string) Opt

func WithStatus

func WithStatus(v *string) Opt

Jump to

Keyboard shortcuts

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