Documentation ¶
Overview ¶
Package models provides data structures for imaging requests, responses, and status codes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Seed ¶
Seed represents the data that validates proof of origin for a request. It is always accompanied by a signature that is used to decrypt and validate its contents.
type SeedFile ¶
SeedFile models the file that is stored on disk by the bootstraper. It is similar to SeedResponse, but does not contain the uneccessary Status and ErrorCode fields, which can contain data not intended to be stored on disk.
type SeedRequest ¶
type SeedRequest struct {
Hash []byte
}
SeedRequest models the data that a client must submit as part of a Seed request
type SeedResponse ¶
type SeedResponse struct { Status string ErrorCode StatusCode Seed Seed Signature []byte }
SeedResponse models the data that is passed back to the client when a seed request is successfully processed.
type SignRequest ¶
SignRequest models the data that a client can submit as part of a sign request.
type SignResponse ¶
type SignResponse struct { Status string ErrorCode StatusCode SignedURL string }
SignResponse models the response to a client sign request.
type StatusCode ¶
type StatusCode int
StatusCode represents an appengine status code, and is used to communicate reasons for request and result rejections, as well as internal failures.
const ( StatusSuccess StatusCode = 0 StatusConfigError StatusCode = iota + 100 StatusReqUnreadable StatusJSONError StatusSignError StatusSeedError StatusSeedInvalidHash StatusInvalidUser )
Internal Status Messages, provided to the client as part of response messages.