Documentation
¶
Index ¶
- type TeresaAPI
- func (o *TeresaAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *TeresaAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *TeresaAPI) DefaultConsumes() string
- func (o *TeresaAPI) DefaultProduces() string
- func (o *TeresaAPI) Formats() strfmt.Registry
- func (o *TeresaAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *TeresaAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *TeresaAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *TeresaAPI) Serve(builder middleware.Builder) http.Handler
- func (o *TeresaAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *TeresaAPI) SetDefaultConsumes(mediaType string)
- func (o *TeresaAPI) SetDefaultProduces(mediaType string)
- func (o *TeresaAPI) SetSpec(spec *loads.Document)
- func (o *TeresaAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TeresaAPI ¶
type TeresaAPI struct { // JSONConsumer registers a consumer for a "application/json" mime type JSONConsumer runtime.Consumer // MultipartformConsumer registers a consumer for a "multipart/form-data" mime type MultipartformConsumer runtime.Consumer // JSONProducer registers a producer for a "application/json" mime type JSONProducer runtime.Producer // BinProducer registers a producer for a "application/octet-stream" mime type BinProducer runtime.Producer // APIKeyAuth registers a function that takes a token and returns a principal // it performs authentication based on an api key token provided in the query APIKeyAuth func(string) (interface{}, error) // TokenHeaderAuth registers a function that takes a token and returns a principal // it performs authentication based on an api key Authorization provided in the header TokenHeaderAuth func(string) (interface{}, error) // TeamsAddUserToTeamHandler sets the operation handler for the add user to team operation TeamsAddUserToTeamHandler teams.AddUserToTeamHandler // AppsCreateAppHandler sets the operation handler for the create app operation AppsCreateAppHandler apps.CreateAppHandler // DeploymentsCreateDeploymentHandler sets the operation handler for the create deployment operation DeploymentsCreateDeploymentHandler deployments.CreateDeploymentHandler // TeamsCreateTeamHandler sets the operation handler for the create team operation TeamsCreateTeamHandler teams.CreateTeamHandler // UsersCreateUserHandler sets the operation handler for the create user operation UsersCreateUserHandler users.CreateUserHandler // TeamsDeleteTeamHandler sets the operation handler for the delete team operation TeamsDeleteTeamHandler teams.DeleteTeamHandler // UsersDeleteUserHandler sets the operation handler for the delete user operation UsersDeleteUserHandler users.DeleteUserHandler // AppsGetAppDetailsHandler sets the operation handler for the get app details operation AppsGetAppDetailsHandler apps.GetAppDetailsHandler // AppsGetAppLogsHandler sets the operation handler for the get app logs operation AppsGetAppLogsHandler apps.GetAppLogsHandler // AppsGetAppsHandler sets the operation handler for the get apps operation AppsGetAppsHandler apps.GetAppsHandler // UsersGetCurrentUserHandler sets the operation handler for the get current user operation UsersGetCurrentUserHandler users.GetCurrentUserHandler // DeploymentsGetDeploymentsHandler sets the operation handler for the get deployments operation DeploymentsGetDeploymentsHandler deployments.GetDeploymentsHandler // TeamsGetTeamDetailHandler sets the operation handler for the get team detail operation TeamsGetTeamDetailHandler teams.GetTeamDetailHandler // TeamsGetTeamsHandler sets the operation handler for the get teams operation TeamsGetTeamsHandler teams.GetTeamsHandler // UsersGetUserDetailsHandler sets the operation handler for the get user details operation UsersGetUserDetailsHandler users.GetUserDetailsHandler // UsersGetUsersHandler sets the operation handler for the get users operation UsersGetUsersHandler users.GetUsersHandler // AppsPartialUpdateAppHandler sets the operation handler for the partial update app operation AppsPartialUpdateAppHandler apps.PartialUpdateAppHandler // AppsUpdateAppHandler sets the operation handler for the update app operation AppsUpdateAppHandler apps.UpdateAppHandler // AppsUpdateAppAutoScaleHandler sets the operation handler for the update app auto scale operation AppsUpdateAppAutoScaleHandler apps.UpdateAppAutoScaleHandler // AppsUpdateAppScaleHandler sets the operation handler for the update app scale operation AppsUpdateAppScaleHandler apps.UpdateAppScaleHandler // TeamsUpdateTeamHandler sets the operation handler for the update team operation TeamsUpdateTeamHandler teams.UpdateTeamHandler // UsersUpdateUserHandler sets the operation handler for the update user operation UsersUpdateUserHandler users.UpdateUserHandler // AuthUserLoginHandler sets the operation handler for the user login operation AuthUserLoginHandler auth.UserLoginHandler // 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 }
TeresaAPI The Teresa PaaS API
func NewTeresaAPI ¶
NewTeresaAPI creates a new Teresa instance
func (*TeresaAPI) AuthenticatorsFor ¶
func (o *TeresaAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*TeresaAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types
func (*TeresaAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*TeresaAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*TeresaAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*TeresaAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types
func (*TeresaAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*TeresaAPI) Serve ¶
func (o *TeresaAPI) 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 (*TeresaAPI) ServeErrorFor ¶
func (o *TeresaAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*TeresaAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*TeresaAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type