api

package
v0.0.0-...-3098c48 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package api contains all high level types of the kube-volume-freezer API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// Code corresponds to HTTP error codes.
	Code    int       `json:"code"`
	Message string    `json:"message"`
	Issues  IssueList `json:"issues,omitempty"`
}

Error contains an API top-level error response.

func (*Error) Append

func (e *Error) Append(err *Issue) *Error

Append adds an Issue to Error.

func (*Error) Error

func (e *Error) Error() string

Error returns a descriptive string.

type FreezeThawRequest

type FreezeThawRequest struct {
	Action string `json:"action" enum:"freeze|thaw" required:"true"`
}

FreezeThawRequest describes a request for freezing or thawing a Volume.

type Health

type Health struct {
	Status string `json:"status"`
}

Health contains current health status.

type Issue

type Issue struct {
	Reason       string `json:"reason"`
	Message      string `json:"message"`
	Domain       string `json:"domain,omitempty"`
	Location     string `json:"location,omitempty"`
	LocationType string `json:"locationType,omitempty"`
}

Issue can be added to an Error.

func (*Issue) Error

func (e *Issue) Error() string

Error returns a descriptive string.

type IssueList

type IssueList []*Issue

IssueList is a list of Issues.

type Volume

type Volume struct {
	Name   string `json:"name"`
	PodUID string `json:"podUID"`
}

Volume contains the information of a Pod Volume.

type VolumeList

type VolumeList struct {
	Items  []string `json:"items"`
	PodUID string   `json:"podUID"`
}

VolumeList contains list of Pod Volumes.

Directories

Path Synopsis
Package errors contains all API errors.
Package errors contains all API errors.
Package issues contains all issues that can be included in API errors.
Package issues contains all issues that can be included in API errors.

Jump to

Keyboard shortcuts

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