api

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// API_VERSION is the API version of Convoy daemon
	API_VERSION = "1"

	KEY_NAME       = "name"
	KEY_BACKUP_URL = "backup"
	KEY_DEST_URL   = "dest"
)

Variables

This section is empty.

Functions

func ResponseError

func ResponseError(format string, a ...interface{})

ResponseError would generate a error information in JSON format for output

func ResponseLogAndError

func ResponseLogAndError(v interface{})

ResponseLogAndError would log the error before call ResponseError()

func ResponseOutput

func ResponseOutput(v interface{}) ([]byte, error)

ResponseOutput would generate a JSON format byte array of object for output

Types

type BackupCreateRequest

type BackupCreateRequest struct {
	URL          string
	Endpoint     string
	SnapshotName string
	Verbose      bool
}

type BackupDeleteRequest

type BackupDeleteRequest struct {
	URL      string
	Endpoint string
}

type BackupListRequest

type BackupListRequest struct {
	URL          string
	Endpoint     string
	VolumeName   string
	SnapshotName string
}

type BackupURLResponse

type BackupURLResponse struct {
	URL string
}

type ErrorResponse

type ErrorResponse struct {
	Error string
}

type SnapshotCreateRequest

type SnapshotCreateRequest struct {
	Name       string
	VolumeName string
	Verbose    bool
}

type SnapshotDeleteRequest

type SnapshotDeleteRequest struct {
	SnapshotName string
}

type SnapshotInspectRequest

type SnapshotInspectRequest struct {
	SnapshotName string
}

type SnapshotResponse

type SnapshotResponse struct {
	Name            string
	VolumeName      string `json:",omitempty"`
	VolumeCreatedAt string `json:",omitempty"`
	CreatedTime     string
	DriverInfo      map[string]string
}

type VolumeCreateRequest

type VolumeCreateRequest struct {
	Name           string
	DriverName     string
	Size           int64
	BackupURL      string
	Endpoint       string
	DriverVolumeID string
	Type           string
	IOPS           int64
	PrepareForVM   bool
	Verbose        bool
}

type VolumeDeleteRequest

type VolumeDeleteRequest struct {
	VolumeName    string
	ReferenceOnly bool
}

type VolumeInspectRequest

type VolumeInspectRequest struct {
	VolumeName string
}

type VolumeMountRequest

type VolumeMountRequest struct {
	VolumeName string
	MountPoint string
	Verbose    bool
}

type VolumeResponse

type VolumeResponse struct {
	Name        string
	Driver      string
	MountPoint  string
	CreatedTime string
	DriverInfo  map[string]string
	Snapshots   map[string]SnapshotResponse
}

type VolumeUmountRequest

type VolumeUmountRequest struct {
	VolumeName string
}

Jump to

Keyboard shortcuts

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