api

package
v17.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HTTP_TIMEOUT = time.Second * 30

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 Backend

type Backend struct {
	Name   string `json:"name"`
	Config struct {
		Version           int      `json:"version"`
		StorageDriverName string   `json:"storageDriverName"`
		StoragePrefix     string   `json:"storagePrefix"`
		SerialNumbers     []string `json:"serialNumbers"`
	} `json:"config"`
	Storage interface{} `json:"storage"`
	Online  bool        `json:"online"`
	Volumes []string    `json:"volumes"`
}

type GetBackendResponse

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

type GetStorageClassResponse

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

type MultipleBackendResponse

type MultipleBackendResponse struct {
	Items []Backend `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 struct {
			BackendType interface{} `json:"backendType"`
		} `json:"attributes"`
	} `json:"Config"`
	Storage interface{} `json:"storage"`
}

type VersionResponse

type VersionResponse struct {
	Server 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"`
	} `json:"server"`
	Client 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"`
	} `json:"client"`
}

Jump to

Keyboard shortcuts

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