Documentation
¶
Index ¶
- type NoodleAPI
- func (o *NoodleAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *NoodleAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *NoodleAPI) Authorizer() runtime.Authorizer
- func (o *NoodleAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *NoodleAPI) Context() *middleware.Context
- func (o *NoodleAPI) DefaultConsumes() string
- func (o *NoodleAPI) DefaultProduces() string
- func (o *NoodleAPI) Formats() strfmt.Registry
- func (o *NoodleAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *NoodleAPI) Init()
- func (o *NoodleAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *NoodleAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *NoodleAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *NoodleAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *NoodleAPI) Serve(builder middleware.Builder) http.Handler
- func (o *NoodleAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *NoodleAPI) SetDefaultConsumes(mediaType string)
- func (o *NoodleAPI) SetDefaultProduces(mediaType string)
- func (o *NoodleAPI) SetSpec(spec *loads.Document)
- func (o *NoodleAPI) UseRedoc()
- func (o *NoodleAPI) UseSwaggerUI()
- func (o *NoodleAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoodleAPI ¶
type NoodleAPI struct {
Middleware func(middleware.Builder) http.Handler
// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator
// JSONConsumer registers a consumer for the following mime types:
// - application/json
JSONConsumer runtime.Consumer
// MultipartformConsumer registers a consumer for the following mime types:
// - multipart/form-data
MultipartformConsumer runtime.Consumer
// JSONProducer registers a producer for the following mime types:
// - application/json
JSONProducer runtime.Producer
// RemoteUserAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key Remote-User provided in the header
RemoteUserAuth func(string) (*models.Principal, error)
// TokenAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key X-Token provided in the header
TokenAuth func(string) (*models.Principal, error)
// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
APIAuthorizer runtime.Authorizer
// NoodleAPIDeleteNoodleApplicationTabsHandler sets the operation handler for the delete noodle application tabs operation
NoodleAPIDeleteNoodleApplicationTabsHandler noodle_api.DeleteNoodleApplicationTabsHandler
// NoodleAPIDeleteNoodleApplicationsHandler sets the operation handler for the delete noodle applications operation
NoodleAPIDeleteNoodleApplicationsHandler noodle_api.DeleteNoodleApplicationsHandler
// NoodleAPIDeleteNoodleGroupApplicationsHandler sets the operation handler for the delete noodle group applications operation
NoodleAPIDeleteNoodleGroupApplicationsHandler noodle_api.DeleteNoodleGroupApplicationsHandler
// NoodleAPIDeleteNoodleTabsHandler sets the operation handler for the delete noodle tabs operation
NoodleAPIDeleteNoodleTabsHandler noodle_api.DeleteNoodleTabsHandler
// NoodleAPIDeleteNoodleUserApplicationsHandler sets the operation handler for the delete noodle user applications operation
NoodleAPIDeleteNoodleUserApplicationsHandler noodle_api.DeleteNoodleUserApplicationsHandler
// NoodleAuthGetAuthLogoutHandler sets the operation handler for the get auth logout operation
NoodleAuthGetAuthLogoutHandler noodle_auth.GetAuthLogoutHandler
// NoodleAuthGetAuthSessionHandler sets the operation handler for the get auth session operation
NoodleAuthGetAuthSessionHandler noodle_auth.GetAuthSessionHandler
// KubernetesGetHealthzHandler sets the operation handler for the get healthz operation
KubernetesGetHealthzHandler kubernetes.GetHealthzHandler
// NoodleAPIGetNoodleAppTemplatesHandler sets the operation handler for the get noodle app templates operation
NoodleAPIGetNoodleAppTemplatesHandler noodle_api.GetNoodleAppTemplatesHandler
// NoodleAPIGetNoodleApplicationTabsHandler sets the operation handler for the get noodle application tabs operation
NoodleAPIGetNoodleApplicationTabsHandler noodle_api.GetNoodleApplicationTabsHandler
// NoodleAPIGetNoodleApplicationsHandler sets the operation handler for the get noodle applications operation
NoodleAPIGetNoodleApplicationsHandler noodle_api.GetNoodleApplicationsHandler
// NoodleAPIGetNoodleGroupApplicationsHandler sets the operation handler for the get noodle group applications operation
NoodleAPIGetNoodleGroupApplicationsHandler noodle_api.GetNoodleGroupApplicationsHandler
// NoodleAPIGetNoodleGroupsHandler sets the operation handler for the get noodle groups operation
NoodleAPIGetNoodleGroupsHandler noodle_api.GetNoodleGroupsHandler
// NoodleAPIGetNoodleHeimdallReloadHandler sets the operation handler for the get noodle heimdall reload operation
NoodleAPIGetNoodleHeimdallReloadHandler noodle_api.GetNoodleHeimdallReloadHandler
// NoodleAPIGetNoodleLdapReloadHandler sets the operation handler for the get noodle ldap reload operation
NoodleAPIGetNoodleLdapReloadHandler noodle_api.GetNoodleLdapReloadHandler
// NoodleAPIGetNoodleTabsHandler sets the operation handler for the get noodle tabs operation
NoodleAPIGetNoodleTabsHandler noodle_api.GetNoodleTabsHandler
// NoodleAPIGetNoodleUploadIconHandler sets the operation handler for the get noodle upload icon operation
NoodleAPIGetNoodleUploadIconHandler noodle_api.GetNoodleUploadIconHandler
// NoodleAPIGetNoodleUserAllowedApplicationsHandler sets the operation handler for the get noodle user allowed applications operation
NoodleAPIGetNoodleUserAllowedApplicationsHandler noodle_api.GetNoodleUserAllowedApplicationsHandler
// NoodleAPIGetNoodleUserApplicationsHandler sets the operation handler for the get noodle user applications operation
NoodleAPIGetNoodleUserApplicationsHandler noodle_api.GetNoodleUserApplicationsHandler
// NoodleAPIGetNoodleUserGroupsHandler sets the operation handler for the get noodle user groups operation
NoodleAPIGetNoodleUserGroupsHandler noodle_api.GetNoodleUserGroupsHandler
// NoodleAPIGetNoodleUsersHandler sets the operation handler for the get noodle users operation
NoodleAPIGetNoodleUsersHandler noodle_api.GetNoodleUsersHandler
// KubernetesGetReadyzHandler sets the operation handler for the get readyz operation
KubernetesGetReadyzHandler kubernetes.GetReadyzHandler
// NoodleAuthPostAuthAuthenticateHandler sets the operation handler for the post auth authenticate operation
NoodleAuthPostAuthAuthenticateHandler noodle_auth.PostAuthAuthenticateHandler
// NoodleAPIPostNoodleApplicationTabsHandler sets the operation handler for the post noodle application tabs operation
NoodleAPIPostNoodleApplicationTabsHandler noodle_api.PostNoodleApplicationTabsHandler
// NoodleAPIPostNoodleApplicationsHandler sets the operation handler for the post noodle applications operation
NoodleAPIPostNoodleApplicationsHandler noodle_api.PostNoodleApplicationsHandler
// NoodleAPIPostNoodleGroupApplicationsHandler sets the operation handler for the post noodle group applications operation
NoodleAPIPostNoodleGroupApplicationsHandler noodle_api.PostNoodleGroupApplicationsHandler
// NoodleAPIPostNoodleTabsHandler sets the operation handler for the post noodle tabs operation
NoodleAPIPostNoodleTabsHandler noodle_api.PostNoodleTabsHandler
// NoodleAPIPostNoodleUploadIconHandler sets the operation handler for the post noodle upload icon operation
NoodleAPIPostNoodleUploadIconHandler noodle_api.PostNoodleUploadIconHandler
// NoodleAPIPostNoodleUserApplicationsHandler sets the operation handler for the post noodle user applications operation
NoodleAPIPostNoodleUserApplicationsHandler noodle_api.PostNoodleUserApplicationsHandler
// 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)
// PreServerShutdown is called before the HTTP(S) server is shutdown
// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
PreServerShutdown func()
// 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
}
NoodleAPI Noodle
func NewNoodleAPI ¶
NewNoodleAPI creates a new Noodle instance
func (*NoodleAPI) AddMiddlewareFor ¶
func (o *NoodleAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
AddMiddlewareFor adds a http middleware to existing handler
func (*NoodleAPI) AuthenticatorsFor ¶
func (o *NoodleAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*NoodleAPI) Authorizer ¶
func (o *NoodleAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*NoodleAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.
func (*NoodleAPI) Context ¶
func (o *NoodleAPI) Context() *middleware.Context
Context returns the middleware context for the noodle API
func (*NoodleAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*NoodleAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*NoodleAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*NoodleAPI) Init ¶
func (o *NoodleAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*NoodleAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.
func (*NoodleAPI) RegisterConsumer ¶
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*NoodleAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*NoodleAPI) RegisterProducer ¶
RegisterProducer allows you to add (or override) a producer for a media type.
func (*NoodleAPI) Serve ¶
func (o *NoodleAPI) 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 (*NoodleAPI) ServeErrorFor ¶
func (o *NoodleAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*NoodleAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*NoodleAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type
func (*NoodleAPI) UseSwaggerUI ¶
func (o *NoodleAPI) UseSwaggerUI()
UseSwaggerUI for documentation at /docs