Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

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