dblabapi

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package dblabapi provides a client for Database Lab HTTP API.

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 provides a Database Lab API client.

func NewClient

func NewClient(options Options) (*Client, error)

NewClient constructs a new Client struct.

func (*Client) CreateClone

func (c *Client) CreateClone(ctx context.Context, cloneRequest types.CloneCreateRequest) (*models.Clone, error)

CreateClone creates a new Database Lab clone.

func (*Client) CreateCloneAsync

func (c *Client) CreateCloneAsync(ctx context.Context, cloneRequest types.CloneCreateRequest) (*models.Clone, error)

CreateCloneAsync asynchronously creates a new Database Lab clone.

func (*Client) DestroyClone

func (c *Client) DestroyClone(ctx context.Context, cloneID string) error

DestroyClone destroys a Database Lab clone.

func (*Client) DestroyCloneAsync

func (c *Client) DestroyCloneAsync(ctx context.Context, cloneID string) error

DestroyCloneAsync asynchronously destroys a Database Lab clone.

func (*Client) Do

func (c *Client) Do(ctx context.Context, request *http.Request) (response *http.Response, err error)

Do makes an HTTP request.

func (*Client) GetClone

func (c *Client) GetClone(ctx context.Context, cloneID string) (*models.Clone, error)

GetClone returns info about a Database Lab clone.

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*models.Health, error)

Health provides instance health info.

func (*Client) ListClones

func (c *Client) ListClones(ctx context.Context) ([]*models.Clone, error)

ListClones provides a list of Database Lab clones.

func (*Client) ListSnapshots

func (c *Client) ListSnapshots(ctx context.Context) ([]*models.Snapshot, error)

ListSnapshots provides a snapshot list.

func (*Client) ResetClone

func (c *Client) ResetClone(ctx context.Context, cloneID string) error

ResetClone resets a Database Lab clone session.

func (*Client) ResetCloneAsync

func (c *Client) ResetCloneAsync(ctx context.Context, cloneID string) error

ResetCloneAsync asynchronously resets a Database Lab clone session.

func (*Client) StartObservation

func (c *Client) StartObservation(ctx context.Context, startRequest types.StartObservationRequest) (*observer.Session, error)

StartObservation starts a clone observation.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*models.InstanceStatus, error)

Status provides an instance status.

func (*Client) StopObservation

func (c *Client) StopObservation(ctx context.Context, stopRequest types.StopObservationRequest) (*models.ObservationResult, error)

StopObservation stops a clone observation.

func (*Client) URL

func (c *Client) URL(endpoint string) *url.URL

URL builds URL for a specific endpoint.

func (*Client) UpdateClone

func (c *Client) UpdateClone(ctx context.Context, cloneID string, updateRequest types.CloneUpdateRequest) (*models.Clone, error)

UpdateClone updates an existing Database Lab clone.

type Options

type Options struct {
	Host              string
	VerificationToken string
	Insecure          bool
}

Options describes options of a Database Lab API client.

Directories

Path Synopsis
Package types provides request structures for Database Lab HTTP API.
Package types provides request structures for Database Lab HTTP API.

Jump to

Keyboard shortcuts

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