params

package
v0.0.0-...-8f2c7cd Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2016 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package params holds all of the request and response parameters for endpoints, along with any required structs.

Index

Constants

View Source
const StatusUnprocessableEntity = 422

StatusUnprocessableEntity describes a request that is correct, but the Entity provided in the request is not able to be processed.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Args     []interface{} `json:"args"`
	Id       string        `json:"id"`
	Requires []string      `json:"requires"`
	Method   string        `json:"method"`
}

Change represents one change in the change set that the GUI needs to execute to deploy the bundle.

type ChangesFromYAMLParams

type ChangesFromYAMLParams struct {
	httprequest.Route `httprequest:"POST /bundlechanges/fromYAML"`
	NicelyFormatted   bool           `httprequest:"nice,form"`
	Body              ChangesRequest `httprequest:",body"`
}

ChangesFromYAMLParams contains the parameters required for passing a bundle to the API and recieving a list of changes in return

type ChangesRequest

type ChangesRequest struct {
	Bundle string `json:"bundle"`
}

ChangesRequest contains the bundle as a YAML-encoded string which is to be parsed into a list of changes.

type ChangesResponse

type ChangesResponse struct {
	Changes []Change `json:"changes"`
}

ChangesResponse contains the results of parsing a bundle into a list of changes.

type ErrorCode

type ErrorCode string

ErrorCode holds the code of an error returned from the API.

const (
	ErrUnparsable          ErrorCode = "unparsable data"
	ErrVerificationFailure ErrorCode = "data cannot be verified"
)

Possible ErrorCodes from the API.

func (ErrorCode) Error

func (code ErrorCode) Error() string

Error implements errrors.Error.

type ErrorResponse

type ErrorResponse struct {
	Message string
	Code    ErrorCode
}

ErrorResponse represents an error encountered by the server.

Jump to

Keyboard shortcuts

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