handler

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivatePlugin

func ActivatePlugin(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title activate the docker volume plugin @Description implement the /Plugin.Activate Docker end point @Accept json @Resource /Plugin.Activate @Success 200 PluginActivate @Router /Plugin.Activate [post] @BasePath http:/Plugin.Activate ActivatePlugin implement the /Plugin.Activate Docker end point

func SetLogLevel

func SetLogLevel() (err error)

SetLogLevel :

func SetMountDir

func SetMountDir() (err error)

SetMountDir :

func SetupChapiClient

func SetupChapiClient(chapidSocket string)

SetupChapiClient will set the chapiclient for the listener on given socket path

func VolumeDriverCapabilities

func VolumeDriverCapabilities(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver capabilities for docker @Description implement the /VolumeDriver.Capabilities Docker end point @Accept json @Resource /VolumeDriver.Capabilities @Success 200 PluginCapability @Router /VolumeDriver.Capabilities [post] @BasePath http:/VolumeDriver.Capabilities VolumeDriverCapabilities implement the /VolumeDriver.Capabilities Docker end point

func VolumeDriverCreate

func VolumeDriverCreate(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver Create for docker @Description implement the /VolumeDriver.Create Docker end point @Accept json @Resource /VolumeDriver.Create @Success 200 CreateResponse @Router /VolumeDriver.Create [post] @BasePath http:/VolumeDriver.Create nolint : gocyclo exceeded VolumeDriverCreate implement the /VolumeDriver.Create Docker end point

func VolumeDriverGet

func VolumeDriverGet(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver get for docker plugin @Description implement the /VolumeDriver.Get Docker end point @Accept json @Resource /VolumeDriver.Get @Success 200 VolumeResponse @Router /VolumeDriver.Get [post] @BasePath http:/VolumeDriver.Get VolumeDriverGet implement the /VolumeDriver.Get Docker end point

func VolumeDriverList

func VolumeDriverList(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver List for docker @Description implement the /VolumeDriver.List Docker end point @Accept json @Resource /VolumeDriver.List @Success 200 ListResponse @Router /VolumeDriver.Lists [post] @BasePath http:/VolumeDriver.List VolumeDriverList implement the /VolumeDriver.List Docker end point

func VolumeDriverMount

func VolumeDriverMount(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver Mount for docker @Description implement the /VolumeDriver.Mount Docker end point @Accept json @Resource /VolumeDriver.Mount @Success 200 MountResponse @Router /VolumeDriver.Mount [post] @BasePath http:/VolumeDriver.Mount nolint : gocyclo exceeded VolumeDriverMount implement the /VolumeDriver.Mount Docker end point

func VolumeDriverPath

func VolumeDriverPath(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver Path for docker @Description implement the /VolumeDriver.Path Docker end point @Accept json @Resource /VolumeDriver.Path @Success 200 MountResponse @Router /VolumeDriver.Path [post] @BasePath http:/VolumeDriver.Path VolumeDriverPath implement the /VolumeDriver.Path Docker end point

func VolumeDriverRemove

func VolumeDriverRemove(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver Remove for docker @Description implement the /VolumeDriver.Remove Docker end point @Accept json @Resource /VolumeDriver.Remove @Success 200 DriverResponse @Router /VolumeDriver.Remove [post] @BasePath http:/VolumeDriver.Remove nolint: gocyclo VolumeDriverRemove implement the /VolumeDriver.Remove Docker end point

func VolumeDriverUnmount

func VolumeDriverUnmount(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver Unmount for docker @Description implement the /VolumeDriver.Unmount Docker end point @Accept json @Resource /VolumeDriver.Unmount @Success 200 DriverResponse @Router /VolumeDriver.Unmount [post] @BasePath http:/VolumeDriver.Unmount nolint: gocyclo VolumeDriverUnmount implement the /VolumeDriver.Unmount Docker end point

func VolumeDriverUpdate

func VolumeDriverUpdate(w http.ResponseWriter, r *http.Request)

@APIVersion 1.0.0 @Title implement the Nimble Volume Driver Update for docker @Description implement the /VolumeDriver.Update Docker end point @Accept json @Resource /VolumeDriver.Update @Success 200 DriverResponse @Router /VolumeDriver.Update [put] @BasePath http:/VolumeDriver.Update VolumeDriverUpdate implement the /VolumeDriver.Update Docker end point

Types

type CreateResponse

type CreateResponse struct {
	Err     string          `json:"Err"`
	Volumes []*model.Volume `json:"volumes,omitempty"`
	Help    string          `json:"help"`
}

CreateResponse : Volume create response struct

type DriverResponse

type DriverResponse struct {
	Err string `json:"Err"`
}

DriverResponse : Driver response struct

type ErrorResponse

type ErrorResponse struct {
	Info string
}

ErrorResponse struct

type HPEVolumeConfigResponse

type HPEVolumeConfigResponse struct {
	Options *HPEVolumeOptions `json:"hpevolumeConfig,omitempty"`
}

HPEVolumeConfigResponse : Nimble Config response

type HPEVolumeOptions

type HPEVolumeOptions struct {
	GlobalOptions   map[string]string `json:"global"`
	DefaultOptions  map[string]string `json:"defaults"`
	OverrideOptions map[string]string `json:"overrides"`
}

HPEVolumeOptions :

type Host

type Host struct {
	UUID              string                    `json:"id,omitempty"`
	Name              string                    `json:"name,omitempty"`
	Domain            string                    `json:"domain,omitempty"`
	NodeID            string                    `json:"node_id,omitempty"`
	AccessProtocol    string                    `json:"access_protocol,omitempty"`
	NetworkInterfaces []*model.NetworkInterface `json:"networks,omitempty"`
	Initiators        []*model.Initiator        `json:"initiators,omitempty"`
	Version           string                    `json:"version,omitempty"`
}

Host is a duplicate of model.Host which references a Network defined in this package

type ListResponse

type ListResponse struct {
	Volumes []*model.Volume `json:"volumes,omitempty"`
	Err     string          `json:"Err"`
}

ListResponse : Volume response struct

type MountResponse

type MountResponse struct {
	MountPoint string `json:"Mountpoint,omitempty"`
	Err        string `json:"Err"`
}

MountResponse : mount response for docker

type NimbleAttachRequest

type NimbleAttachRequest struct {
	Volume *model.Volume  `json:"volume,omitempty"`
	Host   *Host          `json:"host,omitempty"`
	User   *provider.User `json:"user,omitempty"`
	ReqID  string         `json:"req_id,omitempty"`
}

NimbleAttachRequest : Request to call attach on container provider

type NimbleDetachRequest

type NimbleDetachRequest struct {
	Volume *model.Volume  `json:"volume,omitempty"`
	Host   *Host          `json:"host,omitempty"`
	User   *provider.User `json:"user,omitempty"`
	ReqID  string         `json:"req_id,omitempty"`
}

NimbleDetachRequest : Request to call detach on container provider

type PluginActivate

type PluginActivate struct {
	Activate []string `json:"implements,omitempty"`
	Err      string   `json:"Err"`
}

PluginActivate : stuct to parse plugin response from Array

type PluginCapability

type PluginCapability struct {
	Capability *Scope `json:"capabilities,omitempty"`
	Err        string `json:"Err"`
}

PluginCapability : get capabilities of the plugin

type PluginRequest

type PluginRequest struct {
	Name        string                 `json:"name,omitempty"`
	Opts        map[string]interface{} `json:"opts,omitempty"`
	ID          string                 `json:"id,omitempty"`
	Host        *Host                  `json:"host,omitempty"`
	Preferences map[string]interface{} `json:"preference,omitempty"`
	Scope       bool                   `json:"scope,omitempty"`
	User        *provider.User         `json:"user,omitempty"`
	ReqID       string                 `json:"req_id,omitempty"`
}

PluginRequest : Request routed for the plugin

type Scope

type Scope struct {
	Scope string `json:"scope,omitempty"`
}

Scope : scope of the driver (local/global)

type VersionResponse

type VersionResponse struct {
	Version string `json:"Version,omitempty"`
	Err     string `json:"Err,omitempty"`
}

VersionResponse struct

type VolumeResponse

type VolumeResponse struct {
	Volume *model.Volume `json:"volume,omitempty"`
	Err    string        `json:"Err"`
}

VolumeResponse : Volume response struct

type VolumeUnmountResponse

type VolumeUnmountResponse struct {
	VolumeResponse
	Message string `json:"message"`
}

VolumeUnmountResponse : Volume unmount response

Jump to

Keyboard shortcuts

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