api

package
v19.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 8 Imported by: 11

Documentation

Index

Constants

View Source
const HTTPTimeout = time.Second * 300

Variables

This section is empty.

Functions

func InvokeRESTAPI

func InvokeRESTAPI(method string, url string, requestBody []byte, debug bool) (*http.Response, []byte, error)

func LogHTTPRequest

func LogHTTPRequest(request *http.Request, requestBody []byte)

func LogHTTPResponse

func LogHTTPResponse(response *http.Response, responseBody []byte)

Types

type ClientVersionResponse

type ClientVersionResponse struct {
	Client Version `json:"client"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type GetBackendResponse

type GetBackendResponse struct {
	Backend storage.BackendExternal `json:"backend"`
	Error   string                  `json:"error"`
}

type GetStorageClassResponse

type GetStorageClassResponse struct {
	StorageClass `json:"storageClass"`
	Error        string `json:"error"`
}

type KubernetesNamespace

type KubernetesNamespace struct {
	APIVersion string   `json:"apiVersion"`
	Kind       string   `json:"kind"`
	Metadata   Metadata `json:"metadata"`
}

type Metadata

type Metadata struct {
	Name string `json:"name,omitempty"`
}

type MultipleBackendResponse

type MultipleBackendResponse struct {
	Items []storage.BackendExternal `json:"items"`
}

type MultipleNodeResponse

type MultipleNodeResponse struct {
	Items []utils.Node `json:"items"`
}

type MultipleSnapshotResponse

type MultipleSnapshotResponse struct {
	Items []storage.SnapshotExternal `json:"items"`
}

type MultipleStorageClassResponse

type MultipleStorageClassResponse struct {
	Items []StorageClass `json:"items"`
}

type MultipleVolumeResponse

type MultipleVolumeResponse struct {
	Items []storage.VolumeExternal `json:"items"`
}

type StorageClass

type StorageClass struct {
	Config struct {
		Version         string              `json:"version"`
		Name            string              `json:"name"`
		Attributes      interface{}         `json:"attributes"`
		Pools           map[string][]string `json:"storagePools"`
		AdditionalPools map[string][]string `json:"additionalStoragePools"`
	} `json:"Config"`
	Storage interface{} `json:"storage"`
}

type Version

type Version struct {
	Version       string `json:"version"`
	MajorVersion  uint   `json:"majorVersion"`
	MinorVersion  uint   `json:"minorVersion"`
	PatchVersion  uint   `json:"patchVersion"`
	PreRelease    string `json:"preRelease"`
	BuildMetadata string `json:"buildMetadata"`
	APIVersion    string `json:"apiVersion"`
}

type VersionResponse

type VersionResponse struct {
	Server Version `json:"server"`
	Client Version `json:"client"`
}

Jump to

Keyboard shortcuts

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