params

package
v0.0.0-...-d8e9116 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 License: AGPL-3.0 Imports: 1 Imported by: 2

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

View Source
var Version = unknownVersion

Version holds the current version of the service.

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 DebugInfoParams

type DebugInfoParams struct {
	httprequest.Route `httprequest:"GET /debug/info"`
}

DebugInfo Params contains the parameters for getting debug info.

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.

type VersionInfo

type VersionInfo struct {
	GitCommit           string
	BundlechangesCommit string
}

VersionInfo holds information about the git commit of bundleservice and bundlechanges.

Jump to

Keyboard shortcuts

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