latest_backups

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

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 (e *Error) String() string

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	GetWithQuery(ctx context.Context, name, path string, query url.Values, 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 (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 Resource added in v0.15.0

type Resource struct {
	Status         *string    `json:"status,omitempty"`
	LastBackupTime *time.Time `json:"lastBackupTime,omitempty"`
	FailureReason  *string    `json:"failureReason,omitempty"`
}

func (Resource) String added in v0.15.0

func (o Resource) String() string

type Response

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

func (Response) String

func (o Response) String() string

type TaskWaiter

type TaskWaiter interface {
	Wait(ctx context.Context, id string) error
}

Jump to

Keyboard shortcuts

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