Documentation
¶
Index ¶
- type Healthz
- type HealthzDefault
- type HealthzHandler
- type HealthzHandlerFunc
- type HealthzOK
- type HealthzParams
- type MonocularAPI
- func (o *MonocularAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *MonocularAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *MonocularAPI) DefaultConsumes() string
- func (o *MonocularAPI) DefaultProduces() string
- func (o *MonocularAPI) Formats() strfmt.Registry
- func (o *MonocularAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *MonocularAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *MonocularAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *MonocularAPI) Serve(builder middleware.Builder) http.Handler
- func (o *MonocularAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *MonocularAPI) SetDefaultConsumes(mediaType string)
- func (o *MonocularAPI) SetDefaultProduces(mediaType string)
- func (o *MonocularAPI) SetSpec(spec *loads.Document)
- func (o *MonocularAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Healthz ¶
type Healthz struct { Context *middleware.Context Handler HealthzHandler }
Healthz swagger:route GET /healthz healthz
health check
func NewHealthz ¶
func NewHealthz(ctx *middleware.Context, handler HealthzHandler) *Healthz
NewHealthz creates a new http.Handler for the healthz operation
type HealthzDefault ¶
type HealthzDefault struct {
// contains filtered or unexported fields
}
HealthzDefault unexpected error
swagger:response healthzDefault
func NewHealthzDefault ¶
func NewHealthzDefault(code int) *HealthzDefault
NewHealthzDefault creates HealthzDefault with default headers values
func (*HealthzDefault) SetStatusCode ¶
func (o *HealthzDefault) SetStatusCode(code int)
SetStatusCode sets the status to the healthz default response
func (*HealthzDefault) WithStatusCode ¶
func (o *HealthzDefault) WithStatusCode(code int) *HealthzDefault
WithStatusCode adds the status to the healthz default response
func (*HealthzDefault) WriteResponse ¶
func (o *HealthzDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type HealthzHandler ¶
type HealthzHandler interface {
Handle(HealthzParams) middleware.Responder
}
HealthzHandler interface for that can handle valid healthz params
type HealthzHandlerFunc ¶
type HealthzHandlerFunc func(HealthzParams) middleware.Responder
HealthzHandlerFunc turns a function with the right signature into a healthz handler
func (HealthzHandlerFunc) Handle ¶
func (fn HealthzHandlerFunc) Handle(params HealthzParams) middleware.Responder
Handle executing the request and returning a response
type HealthzOK ¶
type HealthzOK struct { }
HealthzOK healthy
swagger:response healthzOK
func NewHealthzOK ¶
func NewHealthzOK() *HealthzOK
NewHealthzOK creates HealthzOK with default headers values
func (*HealthzOK) WriteResponse ¶
func (o *HealthzOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type HealthzParams ¶
HealthzParams contains all the bound params for the healthz operation typically these are obtained from a http.Request
swagger:parameters healthz
func NewHealthzParams ¶
func NewHealthzParams() HealthzParams
NewHealthzParams creates a new HealthzParams object with the default values initialized.
func (*HealthzParams) BindRequest ¶
func (o *HealthzParams) 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 MonocularAPI ¶
type MonocularAPI 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 // ReleasesCreateReleaseHandler sets the operation handler for the create release operation ReleasesCreateReleaseHandler releases.CreateReleaseHandler // RepositoriesCreateRepoHandler sets the operation handler for the create repo operation RepositoriesCreateRepoHandler repositories.CreateRepoHandler // ReleasesDeleteReleaseHandler sets the operation handler for the delete release operation ReleasesDeleteReleaseHandler releases.DeleteReleaseHandler // RepositoriesDeleteRepoHandler sets the operation handler for the delete repo operation RepositoriesDeleteRepoHandler repositories.DeleteRepoHandler // ChartsGetAllChartsHandler sets the operation handler for the get all charts operation ChartsGetAllChartsHandler charts.GetAllChartsHandler // ReleasesGetAllReleasesHandler sets the operation handler for the get all releases operation ReleasesGetAllReleasesHandler releases.GetAllReleasesHandler // RepositoriesGetAllReposHandler sets the operation handler for the get all repos operation RepositoriesGetAllReposHandler repositories.GetAllReposHandler // ChartsGetChartHandler sets the operation handler for the get chart operation ChartsGetChartHandler charts.GetChartHandler // ChartsGetChartVersionHandler sets the operation handler for the get chart version operation ChartsGetChartVersionHandler charts.GetChartVersionHandler // ChartsGetChartVersionsHandler sets the operation handler for the get chart versions operation ChartsGetChartVersionsHandler charts.GetChartVersionsHandler // ChartsGetChartsInRepoHandler sets the operation handler for the get charts in repo operation ChartsGetChartsInRepoHandler charts.GetChartsInRepoHandler // ReleasesGetReleaseHandler sets the operation handler for the get release operation ReleasesGetReleaseHandler releases.GetReleaseHandler // RepositoriesGetRepoHandler sets the operation handler for the get repo operation RepositoriesGetRepoHandler repositories.GetRepoHandler // HealthzHandler sets the operation handler for the healthz operation HealthzHandler HealthzHandler // ChartsSearchChartsHandler sets the operation handler for the search charts operation ChartsSearchChartsHandler charts.SearchChartsHandler // 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 }
MonocularAPI the monocular API
func NewMonocularAPI ¶
func NewMonocularAPI(spec *loads.Document) *MonocularAPI
NewMonocularAPI creates a new Monocular instance
func (*MonocularAPI) AuthenticatorsFor ¶
func (o *MonocularAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*MonocularAPI) ConsumersFor ¶
func (o *MonocularAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*MonocularAPI) DefaultConsumes ¶
func (o *MonocularAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*MonocularAPI) DefaultProduces ¶
func (o *MonocularAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*MonocularAPI) Formats ¶
func (o *MonocularAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*MonocularAPI) HandlerFor ¶
func (o *MonocularAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*MonocularAPI) ProducersFor ¶
func (o *MonocularAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*MonocularAPI) RegisterFormat ¶
func (o *MonocularAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*MonocularAPI) Serve ¶
func (o *MonocularAPI) 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 (*MonocularAPI) ServeErrorFor ¶
func (o *MonocularAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*MonocularAPI) SetDefaultConsumes ¶
func (o *MonocularAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*MonocularAPI) SetDefaultProduces ¶
func (o *MonocularAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*MonocularAPI) SetSpec ¶
func (o *MonocularAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*MonocularAPI) Validate ¶
func (o *MonocularAPI) Validate() error
Validate validates the registrations in the MonocularAPI