Documentation ¶
Index ¶
- func DecodeHmrcCallbackRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeRegisterRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeRetrieveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func EncodeHmrcCallbackError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeHmrcCallbackResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeRegisterError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeRegisterResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeRetrieveError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeRetrieveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func HmrcCallbackMtdPath() string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountHmrcCallbackHandler(mux goahttp.Muxer, h http.Handler)
- func MountRegisterHandler(mux goahttp.Muxer, h http.Handler)
- func MountRetrieveHandler(mux goahttp.Muxer, h http.Handler)
- func NewHmrcCallbackCodePayload(code *string, state *string, error *string, errorDescription *string, ...) *mtd.CodePayload
- func NewHmrcCallbackHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewRegisterHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewRegisterStatePayload(state string) *mtd.StatePayload
- func NewRetrieveHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewRetrieveStatePayload(state string) *mtd.StatePayload
- func RegisterMtdPath(state string) string
- func RetrieveMtdPath(state string) string
- type ErrorNamer
- type HmrcCallbackInvalidRequestResponseBody
- type HmrcCallbackKeyLengthErrorResponseBody
- type HmrcCallbackMatchingKeyNotFoundResponseBody
- type MountPoint
- type RegisterKeyAlreadyExistsResponseBody
- type RegisterKeyIPMismatchResponseBody
- type RegisterKeyLengthErrorResponseBody
- type RetrieveInvalidRequestResponseBody
- type RetrieveKeyHasNoTokenResponseBody
- type RetrieveKeyIPMismatchResponseBody
- type RetrieveMatchingKeyNotFoundResponseBody
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeHmrcCallbackRequest ¶
func DecodeHmrcCallbackRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeHmrcCallbackRequest returns a decoder for requests sent to the mtd hmrc_callback endpoint.
func DecodeRegisterRequest ¶
func DecodeRegisterRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeRegisterRequest returns a decoder for requests sent to the mtd register endpoint.
func DecodeRetrieveRequest ¶
func DecodeRetrieveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeRetrieveRequest returns a decoder for requests sent to the mtd retrieve endpoint.
func EncodeHmrcCallbackError ¶
func EncodeHmrcCallbackError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeHmrcCallbackError returns an encoder for errors returned by the hmrc_callback mtd endpoint.
func EncodeHmrcCallbackResponse ¶
func EncodeHmrcCallbackResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeHmrcCallbackResponse returns an encoder for responses returned by the mtd hmrc_callback endpoint.
func EncodeRegisterError ¶
func EncodeRegisterError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeRegisterError returns an encoder for errors returned by the register mtd endpoint.
func EncodeRegisterResponse ¶
func EncodeRegisterResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeRegisterResponse returns an encoder for responses returned by the mtd register endpoint.
func EncodeRetrieveError ¶
func EncodeRetrieveError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeRetrieveError returns an encoder for errors returned by the retrieve mtd endpoint.
func EncodeRetrieveResponse ¶
func EncodeRetrieveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeRetrieveResponse returns an encoder for responses returned by the mtd retrieve endpoint.
func HmrcCallbackMtdPath ¶
func HmrcCallbackMtdPath() string
HmrcCallbackMtdPath returns the URL path to the mtd service hmrc_callback HTTP endpoint.
func MountHmrcCallbackHandler ¶
MountHmrcCallbackHandler configures the mux to serve the "mtd" service "hmrc_callback" endpoint.
func MountRegisterHandler ¶
MountRegisterHandler configures the mux to serve the "mtd" service "register" endpoint.
func MountRetrieveHandler ¶
MountRetrieveHandler configures the mux to serve the "mtd" service "retrieve" endpoint.
func NewHmrcCallbackCodePayload ¶
func NewHmrcCallbackCodePayload(code *string, state *string, error *string, errorDescription *string, errorCode *string) *mtd.CodePayload
NewHmrcCallbackCodePayload builds a mtd service hmrc_callback endpoint payload.
func NewHmrcCallbackHandler ¶
func NewHmrcCallbackHandler( endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error), ) http.Handler
NewHmrcCallbackHandler creates a HTTP handler which loads the HTTP request and calls the "mtd" service "hmrc_callback" endpoint.
func NewRegisterHandler ¶
func NewRegisterHandler( endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error), ) http.Handler
NewRegisterHandler creates a HTTP handler which loads the HTTP request and calls the "mtd" service "register" endpoint.
func NewRegisterStatePayload ¶
func NewRegisterStatePayload(state string) *mtd.StatePayload
NewRegisterStatePayload builds a mtd service register endpoint payload.
func NewRetrieveHandler ¶
func NewRetrieveHandler( endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error), ) http.Handler
NewRetrieveHandler creates a HTTP handler which loads the HTTP request and calls the "mtd" service "retrieve" endpoint.
func NewRetrieveStatePayload ¶
func NewRetrieveStatePayload(state string) *mtd.StatePayload
NewRetrieveStatePayload builds a mtd service retrieve endpoint payload.
func RegisterMtdPath ¶
RegisterMtdPath returns the URL path to the mtd service register HTTP endpoint.
func RetrieveMtdPath ¶
RetrieveMtdPath returns the URL path to the mtd service retrieve HTTP endpoint.
Types ¶
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.
type HmrcCallbackInvalidRequestResponseBody ¶
type HmrcCallbackInvalidRequestResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
HmrcCallbackInvalidRequestResponseBody is the type of the "mtd" service "hmrc_callback" endpoint HTTP response body for the "invalid_request" error.
func NewHmrcCallbackInvalidRequestResponseBody ¶
func NewHmrcCallbackInvalidRequestResponseBody(res *goa.ServiceError) *HmrcCallbackInvalidRequestResponseBody
NewHmrcCallbackInvalidRequestResponseBody builds the HTTP response body from the result of the "hmrc_callback" endpoint of the "mtd" service.
type HmrcCallbackKeyLengthErrorResponseBody ¶
type HmrcCallbackKeyLengthErrorResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
HmrcCallbackKeyLengthErrorResponseBody is the type of the "mtd" service "hmrc_callback" endpoint HTTP response body for the "key_length_error" error.
func NewHmrcCallbackKeyLengthErrorResponseBody ¶
func NewHmrcCallbackKeyLengthErrorResponseBody(res *goa.ServiceError) *HmrcCallbackKeyLengthErrorResponseBody
NewHmrcCallbackKeyLengthErrorResponseBody builds the HTTP response body from the result of the "hmrc_callback" endpoint of the "mtd" service.
type HmrcCallbackMatchingKeyNotFoundResponseBody ¶
type HmrcCallbackMatchingKeyNotFoundResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
HmrcCallbackMatchingKeyNotFoundResponseBody is the type of the "mtd" service "hmrc_callback" endpoint HTTP response body for the "matching_key_not_found" error.
func NewHmrcCallbackMatchingKeyNotFoundResponseBody ¶
func NewHmrcCallbackMatchingKeyNotFoundResponseBody(res *goa.ServiceError) *HmrcCallbackMatchingKeyNotFoundResponseBody
NewHmrcCallbackMatchingKeyNotFoundResponseBody builds the HTTP response body from the result of the "hmrc_callback" endpoint of the "mtd" service.
type MountPoint ¶
type MountPoint struct { // Method is the name of the service method served by the mounted HTTP handler. Method string // Verb is the HTTP method used to match requests to the mounted handler. Verb string // Pattern is the HTTP request path pattern used to match requests to the // mounted handler. Pattern string }
MountPoint holds information about the mounted endpoints.
type RegisterKeyAlreadyExistsResponseBody ¶
type RegisterKeyAlreadyExistsResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RegisterKeyAlreadyExistsResponseBody is the type of the "mtd" service "register" endpoint HTTP response body for the "key_already_exists" error.
func NewRegisterKeyAlreadyExistsResponseBody ¶
func NewRegisterKeyAlreadyExistsResponseBody(res *goa.ServiceError) *RegisterKeyAlreadyExistsResponseBody
NewRegisterKeyAlreadyExistsResponseBody builds the HTTP response body from the result of the "register" endpoint of the "mtd" service.
type RegisterKeyIPMismatchResponseBody ¶
type RegisterKeyIPMismatchResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RegisterKeyIPMismatchResponseBody is the type of the "mtd" service "register" endpoint HTTP response body for the "key_ip_mismatch" error.
func NewRegisterKeyIPMismatchResponseBody ¶
func NewRegisterKeyIPMismatchResponseBody(res *goa.ServiceError) *RegisterKeyIPMismatchResponseBody
NewRegisterKeyIPMismatchResponseBody builds the HTTP response body from the result of the "register" endpoint of the "mtd" service.
type RegisterKeyLengthErrorResponseBody ¶
type RegisterKeyLengthErrorResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RegisterKeyLengthErrorResponseBody is the type of the "mtd" service "register" endpoint HTTP response body for the "key_length_error" error.
func NewRegisterKeyLengthErrorResponseBody ¶
func NewRegisterKeyLengthErrorResponseBody(res *goa.ServiceError) *RegisterKeyLengthErrorResponseBody
NewRegisterKeyLengthErrorResponseBody builds the HTTP response body from the result of the "register" endpoint of the "mtd" service.
type RetrieveInvalidRequestResponseBody ¶
type RetrieveInvalidRequestResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RetrieveInvalidRequestResponseBody is the type of the "mtd" service "retrieve" endpoint HTTP response body for the "invalid_request" error.
func NewRetrieveInvalidRequestResponseBody ¶
func NewRetrieveInvalidRequestResponseBody(res *goa.ServiceError) *RetrieveInvalidRequestResponseBody
NewRetrieveInvalidRequestResponseBody builds the HTTP response body from the result of the "retrieve" endpoint of the "mtd" service.
type RetrieveKeyHasNoTokenResponseBody ¶
type RetrieveKeyHasNoTokenResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RetrieveKeyHasNoTokenResponseBody is the type of the "mtd" service "retrieve" endpoint HTTP response body for the "key_has_no_token" error.
func NewRetrieveKeyHasNoTokenResponseBody ¶
func NewRetrieveKeyHasNoTokenResponseBody(res *goa.ServiceError) *RetrieveKeyHasNoTokenResponseBody
NewRetrieveKeyHasNoTokenResponseBody builds the HTTP response body from the result of the "retrieve" endpoint of the "mtd" service.
type RetrieveKeyIPMismatchResponseBody ¶
type RetrieveKeyIPMismatchResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RetrieveKeyIPMismatchResponseBody is the type of the "mtd" service "retrieve" endpoint HTTP response body for the "key_ip_mismatch" error.
func NewRetrieveKeyIPMismatchResponseBody ¶
func NewRetrieveKeyIPMismatchResponseBody(res *goa.ServiceError) *RetrieveKeyIPMismatchResponseBody
NewRetrieveKeyIPMismatchResponseBody builds the HTTP response body from the result of the "retrieve" endpoint of the "mtd" service.
type RetrieveMatchingKeyNotFoundResponseBody ¶
type RetrieveMatchingKeyNotFoundResponseBody struct { // Name is the name of this class of errors. Name string `form:"name" json:"name" xml:"name"` // ID is a unique identifier for this particular occurrence of the problem. ID string `form:"id" json:"id" xml:"id"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message string `form:"message" json:"message" xml:"message"` // Is the error temporary? Temporary bool `form:"temporary" json:"temporary" xml:"temporary"` // Is the error a timeout? Timeout bool `form:"timeout" json:"timeout" xml:"timeout"` // Is the error a server-side fault? Fault bool `form:"fault" json:"fault" xml:"fault"` }
RetrieveMatchingKeyNotFoundResponseBody is the type of the "mtd" service "retrieve" endpoint HTTP response body for the "matching_key_not_found" error.
func NewRetrieveMatchingKeyNotFoundResponseBody ¶
func NewRetrieveMatchingKeyNotFoundResponseBody(res *goa.ServiceError) *RetrieveMatchingKeyNotFoundResponseBody
NewRetrieveMatchingKeyNotFoundResponseBody builds the HTTP response body from the result of the "retrieve" endpoint of the "mtd" service.
type Server ¶
type Server struct { Mounts []*MountPoint Register http.Handler Retrieve http.Handler HmrcCallback http.Handler }
Server lists the mtd service endpoint HTTP handlers.
func New ¶
func New( e *mtd.Endpoints, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error), ) *Server
New instantiates HTTP handlers for all the mtd service endpoints.