operations

package
v0.2.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func NewTeresaAPI(spec *loads.Document) *TeresaAPI

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

func (o *TeresaAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types

func (*TeresaAPI) DefaultConsumes

func (o *TeresaAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*TeresaAPI) DefaultProduces

func (o *TeresaAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*TeresaAPI) Formats

func (o *TeresaAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*TeresaAPI) HandlerFor

func (o *TeresaAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*TeresaAPI) ProducersFor

func (o *TeresaAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types

func (*TeresaAPI) RegisterFormat

func (o *TeresaAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

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

func (o *TeresaAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*TeresaAPI) SetDefaultProduces

func (o *TeresaAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*TeresaAPI) SetSpec

func (o *TeresaAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*TeresaAPI) Validate

func (o *TeresaAPI) Validate() error

Validate validates the registrations in the TeresaAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL