admin

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

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 is a client for admin service.

func Dial

func Dial(adminAddr string, opts ...Option) (*Client, error)

Dial creates an instance of Client and dials to the admin service.

func New

func New(opts ...Option) (*Client, error)

New creates an instance of Client.

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the admin service.

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, name string) (*types.Project, error)

CreateProject creates a new project.

func (*Client) Dial

func (c *Client) Dial(adminAddr string) error

Dial dials to the admin service.

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context) ([]*types.Project, error)

ListProjects lists all projects.

func (*Client) UpdateProject

func (c *Client) UpdateProject(
	ctx context.Context,
	id string,
	fields *types.UpdatableProjectFields,
) (*types.Project, error)

UpdateProject updates an existing project.

type Option

type Option func(*Options)

Option configures Options.

func WithLogger

func WithLogger(logger *zap.Logger) Option

WithLogger configures the Logger of the client.

type Options

type Options struct {
	// Logger is the Logger of the client.
	Logger *zap.Logger
}

Options configures how we set up the client.

Jump to

Keyboard shortcuts

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