vm

package
v0.0.0-...-25ad089 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PostVMRunInternalServerErrorCode int = 500

PostVMRunInternalServerErrorCode is the HTTP code returned for type PostVMRunInternalServerError

View Source
const PostVMRunOKCode int = 200

PostVMRunOKCode is the HTTP code returned for type PostVMRunOK

Variables

This section is empty.

Functions

This section is empty.

Types

type PostVMRun

type PostVMRun struct {
	Context *middleware.Context
	Handler PostVMRunHandler
}
PostVMRun swagger:route POST /vm/run vm postVmRun

This endpoint creates a new VM and starts it

func NewPostVMRun

func NewPostVMRun(ctx *middleware.Context, handler PostVMRunHandler) *PostVMRun

NewPostVMRun creates a new http.Handler for the post VM run operation

func (*PostVMRun) ServeHTTP

func (o *PostVMRun) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type PostVMRunHandler

type PostVMRunHandler interface {
	Handle(PostVMRunParams) middleware.Responder
}

PostVMRunHandler interface for that can handle valid post VM run params

type PostVMRunHandlerFunc

type PostVMRunHandlerFunc func(PostVMRunParams) middleware.Responder

PostVMRunHandlerFunc turns a function with the right signature into a post VM run handler

func (PostVMRunHandlerFunc) Handle

Handle executing the request and returning a response

type PostVMRunInternalServerError

type PostVMRunInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.StandardError `json:"body,omitempty"`
}

PostVMRunInternalServerError Internal Server Error

swagger:response postVmRunInternalServerError

func NewPostVMRunInternalServerError

func NewPostVMRunInternalServerError() *PostVMRunInternalServerError

NewPostVMRunInternalServerError creates PostVMRunInternalServerError with default headers values

func (*PostVMRunInternalServerError) SetPayload

func (o *PostVMRunInternalServerError) SetPayload(payload *models.StandardError)

SetPayload sets the payload to the post Vm run internal server error response

func (*PostVMRunInternalServerError) WithPayload

WithPayload adds the payload to the post Vm run internal server error response

func (*PostVMRunInternalServerError) WriteResponse

func (o *PostVMRunInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type PostVMRunOK

type PostVMRunOK struct {

	/*
	  In: Body
	*/
	Payload *models.VM `json:"body,omitempty"`
}

PostVMRunOK Success

swagger:response postVmRunOK

func NewPostVMRunOK

func NewPostVMRunOK() *PostVMRunOK

NewPostVMRunOK creates PostVMRunOK with default headers values

func (*PostVMRunOK) SetPayload

func (o *PostVMRunOK) SetPayload(payload *models.VM)

SetPayload sets the payload to the post Vm run o k response

func (*PostVMRunOK) WithPayload

func (o *PostVMRunOK) WithPayload(payload *models.VM) *PostVMRunOK

WithPayload adds the payload to the post Vm run o k response

func (*PostVMRunOK) WriteResponse

func (o *PostVMRunOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type PostVMRunParams

type PostVMRunParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

PostVMRunParams contains all the bound params for the post VM run operation typically these are obtained from a http.Request

swagger:parameters PostVMRun

func NewPostVMRunParams

func NewPostVMRunParams() PostVMRunParams

NewPostVMRunParams creates a new PostVMRunParams object

There are no default values defined in the spec.

func (*PostVMRunParams) BindRequest

func (o *PostVMRunParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewPostVMRunParams() beforehand.

type PostVMRunURL

type PostVMRunURL struct {
	// contains filtered or unexported fields
}

PostVMRunURL generates an URL for the post VM run operation

func (*PostVMRunURL) Build

func (o *PostVMRunURL) Build() (*url.URL, error)

Build a url path and query string

func (*PostVMRunURL) BuildFull

func (o *PostVMRunURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*PostVMRunURL) Must

func (o *PostVMRunURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*PostVMRunURL) SetBasePath

func (o *PostVMRunURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*PostVMRunURL) String

func (o *PostVMRunURL) String() string

String returns the string representation of the path with query string

func (*PostVMRunURL) StringFull

func (o *PostVMRunURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*PostVMRunURL) WithBasePath

func (o *PostVMRunURL) WithBasePath(bp string) *PostVMRunURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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