client

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0 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 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