Documentation ¶
Index ¶
- type OshinkoRestAPI
- func (o *OshinkoRestAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *OshinkoRestAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *OshinkoRestAPI) Context() *middleware.Context
- func (o *OshinkoRestAPI) DefaultConsumes() string
- func (o *OshinkoRestAPI) DefaultProduces() string
- func (o *OshinkoRestAPI) Formats() strfmt.Registry
- func (o *OshinkoRestAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *OshinkoRestAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *OshinkoRestAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *OshinkoRestAPI) Serve(builder middleware.Builder) http.Handler
- func (o *OshinkoRestAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *OshinkoRestAPI) SetDefaultConsumes(mediaType string)
- func (o *OshinkoRestAPI) SetDefaultProduces(mediaType string)
- func (o *OshinkoRestAPI) SetSpec(spec *loads.Document)
- func (o *OshinkoRestAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OshinkoRestAPI ¶
type OshinkoRestAPI struct { // JSONConsumer registers a consumer for a "application/json" mime type JSONConsumer runtime.Consumer // JSONProducer registers a producer for a "application/json" mime type JSONProducer runtime.Producer // ClustersCreateClusterHandler sets the operation handler for the create cluster operation ClustersCreateClusterHandler clusters.CreateClusterHandler // ClustersDeleteSingleClusterHandler sets the operation handler for the delete single cluster operation ClustersDeleteSingleClusterHandler clusters.DeleteSingleClusterHandler // ClustersFindClustersHandler sets the operation handler for the find clusters operation ClustersFindClustersHandler clusters.FindClustersHandler // ClustersFindSingleClusterHandler sets the operation handler for the find single cluster operation ClustersFindSingleClusterHandler clusters.FindSingleClusterHandler // ServerGetServerInfoHandler sets the operation handler for the get server info operation ServerGetServerInfoHandler server.GetServerInfoHandler // ClustersUpdateSingleClusterHandler sets the operation handler for the update single cluster operation ClustersUpdateSingleClusterHandler clusters.UpdateSingleClusterHandler // 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 }
OshinkoRestAPI The REST API server for the Oshinko suite of applications
func NewOshinkoRestAPI ¶
func NewOshinkoRestAPI(spec *loads.Document) *OshinkoRestAPI
NewOshinkoRestAPI creates a new OshinkoRest instance
func (*OshinkoRestAPI) AuthenticatorsFor ¶
func (o *OshinkoRestAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*OshinkoRestAPI) ConsumersFor ¶
func (o *OshinkoRestAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*OshinkoRestAPI) Context ¶
func (o *OshinkoRestAPI) Context() *middleware.Context
func (*OshinkoRestAPI) DefaultConsumes ¶
func (o *OshinkoRestAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*OshinkoRestAPI) DefaultProduces ¶
func (o *OshinkoRestAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*OshinkoRestAPI) Formats ¶
func (o *OshinkoRestAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*OshinkoRestAPI) HandlerFor ¶
func (o *OshinkoRestAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*OshinkoRestAPI) ProducersFor ¶
func (o *OshinkoRestAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*OshinkoRestAPI) RegisterFormat ¶
func (o *OshinkoRestAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*OshinkoRestAPI) Serve ¶
func (o *OshinkoRestAPI) 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 (*OshinkoRestAPI) ServeErrorFor ¶
func (o *OshinkoRestAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*OshinkoRestAPI) SetDefaultConsumes ¶
func (o *OshinkoRestAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*OshinkoRestAPI) SetDefaultProduces ¶
func (o *OshinkoRestAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*OshinkoRestAPI) SetSpec ¶
func (o *OshinkoRestAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*OshinkoRestAPI) Validate ¶
func (o *OshinkoRestAPI) Validate() error
Validate validates the registrations in the OshinkoRestAPI