Documentation ¶
Index ¶
- Constants
- type DeathstarAPI
- func (o *DeathstarAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *DeathstarAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *DeathstarAPI) Context() *middleware.Context
- func (o *DeathstarAPI) DefaultConsumes() string
- func (o *DeathstarAPI) DefaultProduces() string
- func (o *DeathstarAPI) Formats() strfmt.Registry
- func (o *DeathstarAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *DeathstarAPI) Init()
- func (o *DeathstarAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *DeathstarAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *DeathstarAPI) Serve(builder middleware.Builder) http.Handler
- func (o *DeathstarAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *DeathstarAPI) SetDefaultConsumes(mediaType string)
- func (o *DeathstarAPI) SetDefaultProduces(mediaType string)
- func (o *DeathstarAPI) SetSpec(spec *loads.Document)
- func (o *DeathstarAPI) Validate() error
- type Get
- type GetHandler
- type GetHandlerFunc
- type GetOK
- type GetParams
- type GetURL
- func (o *GetURL) Build() (*url.URL, error)
- func (o *GetURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetURL) Must(u *url.URL, err error) *url.URL
- func (o *GetURL) SetBasePath(bp string)
- func (o *GetURL) String() string
- func (o *GetURL) StringFull(scheme, host string) string
- func (o *GetURL) WithBasePath(bp string) *GetURL
- type PostRequestLanding
- type PostRequestLandingHandler
- type PostRequestLandingHandlerFunc
- type PostRequestLandingOK
- type PostRequestLandingParams
- type PostRequestLandingURL
- func (o *PostRequestLandingURL) Build() (*url.URL, error)
- func (o *PostRequestLandingURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *PostRequestLandingURL) Must(u *url.URL, err error) *url.URL
- func (o *PostRequestLandingURL) SetBasePath(bp string)
- func (o *PostRequestLandingURL) String() string
- func (o *PostRequestLandingURL) StringFull(scheme, host string) string
- func (o *PostRequestLandingURL) WithBasePath(bp string) *PostRequestLandingURL
- type PutExhaustPort
- type PutExhaustPortHandler
- type PutExhaustPortHandlerFunc
- type PutExhaustPortOK
- type PutExhaustPortParams
- type PutExhaustPortServiceUnavailable
- type PutExhaustPortURL
- func (o *PutExhaustPortURL) Build() (*url.URL, error)
- func (o *PutExhaustPortURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *PutExhaustPortURL) Must(u *url.URL, err error) *url.URL
- func (o *PutExhaustPortURL) SetBasePath(bp string)
- func (o *PutExhaustPortURL) String() string
- func (o *PutExhaustPortURL) StringFull(scheme, host string) string
- func (o *PutExhaustPortURL) WithBasePath(bp string) *PutExhaustPortURL
Constants ¶
const GetOKCode int = 200
HTTP code for type GetOK
const PostRequestLandingOKCode int = 200
HTTP code for type PostRequestLandingOK
const PutExhaustPortOKCode int = 200
HTTP code for type PutExhaustPortOK
HTTP code for type PutExhaustPortServiceUnavailable
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeathstarAPI ¶
type DeathstarAPI struct { Middleware func(middleware.Builder) http.Handler // JSONConsumer registers a consumer for a "application/json" mime type JSONConsumer runtime.Consumer // TxtProducer registers a producer for a "text/plain" mime type TxtProducer runtime.Producer // GetHandler sets the operation handler for the get operation GetHandler GetHandler // PostRequestLandingHandler sets the operation handler for the post request landing operation PostRequestLandingHandler PostRequestLandingHandler // PutExhaustPortHandler sets the operation handler for the put exhaust port operation PutExhaustPortHandler PutExhaustPortHandler // ServeError is called when an error is received, there is a default handler // but you can set your own with this ServeError func(http.ResponseWriter, *http.Request, error) // ServerShutdown is called when the HTTP(S) server is shut down and done // handling all active connections and does not accept connections any more ServerShutdown func() // Custom command line argument groups with their descriptions CommandLineOptionsGroups []swag.CommandLineOptionsGroup // User defined logger function. Logger func(string, ...interface{}) // contains filtered or unexported fields }
DeathstarAPI API of a Star Wars Deathstar
func NewDeathstarAPI ¶
func NewDeathstarAPI(spec *loads.Document) *DeathstarAPI
NewDeathstarAPI creates a new Deathstar instance
func (*DeathstarAPI) AuthenticatorsFor ¶
func (o *DeathstarAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*DeathstarAPI) ConsumersFor ¶
func (o *DeathstarAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*DeathstarAPI) Context ¶
func (o *DeathstarAPI) Context() *middleware.Context
Context returns the middleware context for the deathstar API
func (*DeathstarAPI) DefaultConsumes ¶
func (o *DeathstarAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*DeathstarAPI) DefaultProduces ¶
func (o *DeathstarAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*DeathstarAPI) Formats ¶
func (o *DeathstarAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*DeathstarAPI) HandlerFor ¶
func (o *DeathstarAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*DeathstarAPI) Init ¶
func (o *DeathstarAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit
func (*DeathstarAPI) ProducersFor ¶
func (o *DeathstarAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*DeathstarAPI) RegisterFormat ¶
func (o *DeathstarAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*DeathstarAPI) Serve ¶
func (o *DeathstarAPI) Serve(builder middleware.Builder) http.Handler
Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (*DeathstarAPI) ServeErrorFor ¶
func (o *DeathstarAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*DeathstarAPI) SetDefaultConsumes ¶
func (o *DeathstarAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*DeathstarAPI) SetDefaultProduces ¶
func (o *DeathstarAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*DeathstarAPI) SetSpec ¶
func (o *DeathstarAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*DeathstarAPI) Validate ¶
func (o *DeathstarAPI) Validate() error
Validate validates the registrations in the DeathstarAPI
type Get ¶
type Get struct { Context *middleware.Context Handler GetHandler }
Get swagger:route GET / get
Get in touch with the deathstar
func NewGet ¶
func NewGet(ctx *middleware.Context, handler GetHandler) *Get
NewGet creates a new http.Handler for the get operation
type GetHandler ¶
type GetHandler interface {
Handle(GetParams) middleware.Responder
}
GetHandler interface for that can handle valid get params
type GetHandlerFunc ¶
type GetHandlerFunc func(GetParams) middleware.Responder
GetHandlerFunc turns a function with the right signature into a get handler
func (GetHandlerFunc) Handle ¶
func (fn GetHandlerFunc) Handle(params GetParams) middleware.Responder
Handle executing the request and returning a response
type GetOK ¶
type GetOK struct { /* In: Body */ Payload string `json:"body,omitempty"` }
GetOK OK
swagger:response getOK
func (*GetOK) SetPayload ¶
SetPayload sets the payload to the get o k response
func (*GetOK) WithPayload ¶
WithPayload adds the payload to the get o k response
func (*GetOK) WriteResponse ¶
func (o *GetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetParams ¶
GetParams contains all the bound params for the get operation typically these are obtained from a http.Request
swagger:parameters Get
func NewGetParams ¶
func NewGetParams() GetParams
NewGetParams creates a new GetParams object with the default values initialized.
func (*GetParams) BindRequest ¶
func (o *GetParams) 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
type GetURL ¶
type GetURL struct {
// contains filtered or unexported fields
}
GetURL generates an URL for the get operation
func (*GetURL) SetBasePath ¶
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 (*GetURL) StringFull ¶
StringFull returns the string representation of a complete url
func (*GetURL) WithBasePath ¶
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
type PostRequestLanding ¶
type PostRequestLanding struct { Context *middleware.Context Handler PostRequestLandingHandler }
PostRequestLanding swagger:route POST /request-landing postRequestLanding
Land a ship in the ship bay
func NewPostRequestLanding ¶
func NewPostRequestLanding(ctx *middleware.Context, handler PostRequestLandingHandler) *PostRequestLanding
NewPostRequestLanding creates a new http.Handler for the post request landing operation
func (*PostRequestLanding) ServeHTTP ¶
func (o *PostRequestLanding) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PostRequestLandingHandler ¶
type PostRequestLandingHandler interface {
Handle(PostRequestLandingParams) middleware.Responder
}
PostRequestLandingHandler interface for that can handle valid post request landing params
type PostRequestLandingHandlerFunc ¶
type PostRequestLandingHandlerFunc func(PostRequestLandingParams) middleware.Responder
PostRequestLandingHandlerFunc turns a function with the right signature into a post request landing handler
func (PostRequestLandingHandlerFunc) Handle ¶
func (fn PostRequestLandingHandlerFunc) Handle(params PostRequestLandingParams) middleware.Responder
Handle executing the request and returning a response
type PostRequestLandingOK ¶
type PostRequestLandingOK struct { /* In: Body */ Payload string `json:"body,omitempty"` }
PostRequestLandingOK OK
swagger:response postRequestLandingOK
func NewPostRequestLandingOK ¶
func NewPostRequestLandingOK() *PostRequestLandingOK
NewPostRequestLandingOK creates PostRequestLandingOK with default headers values
func (*PostRequestLandingOK) SetPayload ¶
func (o *PostRequestLandingOK) SetPayload(payload string)
SetPayload sets the payload to the post request landing o k response
func (*PostRequestLandingOK) WithPayload ¶
func (o *PostRequestLandingOK) WithPayload(payload string) *PostRequestLandingOK
WithPayload adds the payload to the post request landing o k response
func (*PostRequestLandingOK) WriteResponse ¶
func (o *PostRequestLandingOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostRequestLandingParams ¶
PostRequestLandingParams contains all the bound params for the post request landing operation typically these are obtained from a http.Request
swagger:parameters PostRequestLanding
func NewPostRequestLandingParams ¶
func NewPostRequestLandingParams() PostRequestLandingParams
NewPostRequestLandingParams creates a new PostRequestLandingParams object with the default values initialized.
func (*PostRequestLandingParams) BindRequest ¶
func (o *PostRequestLandingParams) 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
type PostRequestLandingURL ¶
type PostRequestLandingURL struct {
// contains filtered or unexported fields
}
PostRequestLandingURL generates an URL for the post request landing operation
func (*PostRequestLandingURL) Build ¶
func (o *PostRequestLandingURL) Build() (*url.URL, error)
Build a url path and query string
func (*PostRequestLandingURL) BuildFull ¶
func (o *PostRequestLandingURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*PostRequestLandingURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*PostRequestLandingURL) SetBasePath ¶
func (o *PostRequestLandingURL) 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 (*PostRequestLandingURL) String ¶
func (o *PostRequestLandingURL) String() string
String returns the string representation of the path with query string
func (*PostRequestLandingURL) StringFull ¶
func (o *PostRequestLandingURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*PostRequestLandingURL) WithBasePath ¶
func (o *PostRequestLandingURL) WithBasePath(bp string) *PostRequestLandingURL
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
type PutExhaustPort ¶
type PutExhaustPort struct { Context *middleware.Context Handler PutExhaustPortHandler }
PutExhaustPort swagger:route PUT /exhaust-port putExhaustPort
Put something into the thermal exhaust port of the deathstar
func NewPutExhaustPort ¶
func NewPutExhaustPort(ctx *middleware.Context, handler PutExhaustPortHandler) *PutExhaustPort
NewPutExhaustPort creates a new http.Handler for the put exhaust port operation
func (*PutExhaustPort) ServeHTTP ¶
func (o *PutExhaustPort) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PutExhaustPortHandler ¶
type PutExhaustPortHandler interface {
Handle(PutExhaustPortParams) middleware.Responder
}
PutExhaustPortHandler interface for that can handle valid put exhaust port params
type PutExhaustPortHandlerFunc ¶
type PutExhaustPortHandlerFunc func(PutExhaustPortParams) middleware.Responder
PutExhaustPortHandlerFunc turns a function with the right signature into a put exhaust port handler
func (PutExhaustPortHandlerFunc) Handle ¶
func (fn PutExhaustPortHandlerFunc) Handle(params PutExhaustPortParams) middleware.Responder
Handle executing the request and returning a response
type PutExhaustPortOK ¶
type PutExhaustPortOK struct { /* In: Body */ Payload string `json:"body,omitempty"` }
PutExhaustPortOK OK
swagger:response putExhaustPortOK
func NewPutExhaustPortOK ¶
func NewPutExhaustPortOK() *PutExhaustPortOK
NewPutExhaustPortOK creates PutExhaustPortOK with default headers values
func (*PutExhaustPortOK) SetPayload ¶
func (o *PutExhaustPortOK) SetPayload(payload string)
SetPayload sets the payload to the put exhaust port o k response
func (*PutExhaustPortOK) WithPayload ¶
func (o *PutExhaustPortOK) WithPayload(payload string) *PutExhaustPortOK
WithPayload adds the payload to the put exhaust port o k response
func (*PutExhaustPortOK) WriteResponse ¶
func (o *PutExhaustPortOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PutExhaustPortParams ¶
PutExhaustPortParams contains all the bound params for the put exhaust port operation typically these are obtained from a http.Request
swagger:parameters PutExhaustPort
func NewPutExhaustPortParams ¶
func NewPutExhaustPortParams() PutExhaustPortParams
NewPutExhaustPortParams creates a new PutExhaustPortParams object with the default values initialized.
func (*PutExhaustPortParams) BindRequest ¶
func (o *PutExhaustPortParams) 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
type PutExhaustPortServiceUnavailable ¶
type PutExhaustPortServiceUnavailable struct { string `json:"body,omitempty"` }Payload
PutExhaustPortServiceUnavailable Deathstar exploded
swagger:response putExhaustPortServiceUnavailable
func NewPutExhaustPortServiceUnavailable ¶
func NewPutExhaustPortServiceUnavailable() *PutExhaustPortServiceUnavailable
NewPutExhaustPortServiceUnavailable creates PutExhaustPortServiceUnavailable with default headers values
func (*PutExhaustPortServiceUnavailable) SetPayload ¶
func (o *PutExhaustPortServiceUnavailable) SetPayload(payload string)
SetPayload sets the payload to the put exhaust port service unavailable response
func (*PutExhaustPortServiceUnavailable) WithPayload ¶
func (o *PutExhaustPortServiceUnavailable) WithPayload(payload string) *PutExhaustPortServiceUnavailable
WithPayload adds the payload to the put exhaust port service unavailable response
func (*PutExhaustPortServiceUnavailable) WriteResponse ¶
func (o *PutExhaustPortServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PutExhaustPortURL ¶
type PutExhaustPortURL struct {
// contains filtered or unexported fields
}
PutExhaustPortURL generates an URL for the put exhaust port operation
func (*PutExhaustPortURL) Build ¶
func (o *PutExhaustPortURL) Build() (*url.URL, error)
Build a url path and query string
func (*PutExhaustPortURL) BuildFull ¶
func (o *PutExhaustPortURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*PutExhaustPortURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*PutExhaustPortURL) SetBasePath ¶
func (o *PutExhaustPortURL) 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 (*PutExhaustPortURL) String ¶
func (o *PutExhaustPortURL) String() string
String returns the string representation of the path with query string
func (*PutExhaustPortURL) StringFull ¶
func (o *PutExhaustPortURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*PutExhaustPortURL) WithBasePath ¶
func (o *PutExhaustPortURL) WithBasePath(bp string) *PutExhaustPortURL
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
Source Files ¶
- deathstar_api.go
- get.go
- get_parameters.go
- get_responses.go
- get_urlbuilder.go
- post_request_landing.go
- post_request_landing_parameters.go
- post_request_landing_responses.go
- post_request_landing_urlbuilder.go
- put_exhaust_port.go
- put_exhaust_port_parameters.go
- put_exhaust_port_responses.go
- put_exhaust_port_urlbuilder.go