latest_backups

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 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 API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API

func (*API) Get

func (a *API) Get(ctx context.Context, subscription int, database int) (*LatestBackupStatus, error)

func (*API) GetActiveActive

func (a *API) GetActiveActive(ctx context.Context, subscription int, database int, region string) (*LatestBackupStatus, error)

func (*API) GetFixed added in v0.14.1

func (a *API) GetFixed(ctx context.Context, subscription int, database int) (*LatestBackupStatus, error)

type Error

type Error struct {
	Type        *string `json:"type,omitempty"`
	Description *string `json:"description,omitempty"`
	Status      *string `json:"status,omitempty"`
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) StatusCode

func (e *Error) StatusCode() string

func (Error) String

func (o Error) String() string

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
}

type LatestBackupStatus

type LatestBackupStatus struct {
	CommandType *string   `json:"commandType,omitempty"`
	Description *string   `json:"description,omitempty"`
	Status      *string   `json:"status,omitempty"`
	ID          *string   `json:"taskId,omitempty"`
	Response    *Response `json:"response,omitempty"`
}

func NewLatestBackupStatus

func NewLatestBackupStatus(task *internal.Task) *LatestBackupStatus

func (LatestBackupStatus) String

func (o LatestBackupStatus) String() string

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

type NotFound

type NotFound struct {
	// contains filtered or unexported fields
}

func (*NotFound) Error

func (f *NotFound) Error() string

type NotFoundActiveActive

type NotFoundActiveActive struct {
	// contains filtered or unexported fields
}

func (*NotFoundActiveActive) Error

func (f *NotFoundActiveActive) Error() string

type Response

type Response struct {
	ID       *int             `json:"resourceId,omitempty"`
	Resource *json.RawMessage `json:"resource,omitempty"`
	Error    *Error           `json:"error,omitempty"`
}

func (Response) String

func (o Response) String() string

type TaskWaiter

type TaskWaiter interface {
	WaitForTask(ctx context.Context, id string) (*internal.Task, error)
}

Jump to

Keyboard shortcuts

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