client

package
v1.5.17 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 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) CreateDatabase

func (c *Client) CreateDatabase(ctx context.Context, database schema.DatabaseMeta) (*schema.Database, error)

func (*Client) CreateRole

func (c *Client) CreateRole(ctx context.Context, role schema.RoleMeta) (*schema.Role, error)

func (*Client) CreateSchema

func (c *Client) CreateSchema(ctx context.Context, meta schema.SchemaMeta) (*schema.Schema, error)

func (*Client) CreateTablespace

func (c *Client) CreateTablespace(ctx context.Context, meta schema.TablespaceMeta, location string) (*schema.Tablespace, error)

func (*Client) DeleteConnection

func (c *Client) DeleteConnection(ctx context.Context, pid uint64) error

func (*Client) DeleteDatabase

func (c *Client) DeleteDatabase(ctx context.Context, name string, opt ...Opt) error

func (*Client) DeleteRole

func (c *Client) DeleteRole(ctx context.Context, name string) error

func (*Client) DeleteSchema

func (c *Client) DeleteSchema(ctx context.Context, name string, opt ...Opt) error

func (*Client) DeleteTablespace

func (c *Client) DeleteTablespace(ctx context.Context, name string) error

func (*Client) GetConnection

func (c *Client) GetConnection(ctx context.Context, pid uint64) (*schema.Connection, error)

func (*Client) GetDatabase

func (c *Client) GetDatabase(ctx context.Context, name string) (*schema.Database, error)

func (*Client) GetObject

func (c *Client) GetObject(ctx context.Context, database, namespace, name string) (*schema.Object, error)

func (*Client) GetRole

func (c *Client) GetRole(ctx context.Context, name string) (*schema.Role, error)

func (*Client) GetSchema

func (c *Client) GetSchema(ctx context.Context, name string) (*schema.Database, error)

func (*Client) GetTablespace

func (c *Client) GetTablespace(ctx context.Context, name string) (*schema.Tablespace, error)

func (*Client) ListConnections

func (c *Client) ListConnections(ctx context.Context, opts ...Opt) (*schema.ConnectionList, error)

func (*Client) ListDatabases

func (c *Client) ListDatabases(ctx context.Context, opts ...Opt) (*schema.DatabaseList, error)

func (*Client) ListObjects

func (c *Client) ListObjects(ctx context.Context, opts ...Opt) (*schema.ObjectList, error)

func (*Client) ListRoles

func (c *Client) ListRoles(ctx context.Context, opts ...Opt) (*schema.RoleList, error)

func (*Client) ListSchemas

func (c *Client) ListSchemas(ctx context.Context, opts ...Opt) (*schema.SchemaList, error)

func (*Client) ListTablespaces

func (c *Client) ListTablespaces(ctx context.Context, opts ...Opt) (*schema.TablespaceList, error)

func (*Client) UpdateDatabase

func (c *Client) UpdateDatabase(ctx context.Context, name string, meta schema.DatabaseMeta) (*schema.Database, error)

func (*Client) UpdateRole

func (c *Client) UpdateRole(ctx context.Context, name string, meta schema.RoleMeta) (*schema.Role, error)

func (*Client) UpdateSchema

func (c *Client) UpdateSchema(ctx context.Context, name string, meta schema.SchemaMeta) (*schema.Schema, error)

func (*Client) UpdateTablespace

func (c *Client) UpdateTablespace(ctx context.Context, name string, meta schema.TablespaceMeta) (*schema.Tablespace, error)

type Opt

type Opt func(*opt) error

An Option to set on the client

func OptSet

func OptSet(k, v string) Opt

func WithDatabase

func WithDatabase(v *string) Opt

func WithForce

func WithForce(v bool) Opt

func WithOffsetLimit

func WithOffsetLimit(offset uint64, limit *uint64) Opt

Set offset and limit

func WithRole

func WithRole(v *string) Opt

func WithSchema

func WithSchema(v *string) Opt

func WithState

func WithState(v *string) Opt

func WithType

func WithType(v *string) Opt

Jump to

Keyboard shortcuts

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