Documentation
¶
Index ¶
- type EntryAPI
- func (o *EntryAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *EntryAPI) Authorizer() runtime.Authorizer
- func (o *EntryAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *EntryAPI) Context() *middleware.Context
- func (o *EntryAPI) DefaultConsumes() string
- func (o *EntryAPI) DefaultProduces() string
- func (o *EntryAPI) Formats() strfmt.Registry
- func (o *EntryAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *EntryAPI) Init()
- func (o *EntryAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *EntryAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *EntryAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *EntryAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *EntryAPI) Serve(builder middleware.Builder) http.Handler
- func (o *EntryAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *EntryAPI) SetDefaultConsumes(mediaType string)
- func (o *EntryAPI) SetDefaultProduces(mediaType string)
- func (o *EntryAPI) SetSpec(spec *loads.Document)
- func (o *EntryAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryAPI ¶
type EntryAPI struct {
Middleware func(middleware.Builder) http.Handler
// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
// It has a default implemention 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 implemention 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 implemention 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 a "application/vnd.laincloud.entry.v3+json" mime type
JSONConsumer runtime.Consumer
// JSONProducer registers a producer for a "application/vnd.laincloud.entry.v3+json" mime type
JSONProducer runtime.Producer
// ContainerAttachContainerHandler sets the operation handler for the attach container operation
ContainerAttachContainerHandler container.AttachContainerHandler
// AuthAuthorizeHandler sets the operation handler for the authorize operation
AuthAuthorizeHandler auth.AuthorizeHandler
// ContainerEnterContainerHandler sets the operation handler for the enter container operation
ContainerEnterContainerHandler container.EnterContainerHandler
// ConfigGetConfigHandler sets the operation handler for the get config operation
ConfigGetConfigHandler config.GetConfigHandler
// CommandsListCommandsHandler sets the operation handler for the list commands operation
CommandsListCommandsHandler commands.ListCommandsHandler
// SessionsListSessionsHandler sets the operation handler for the list sessions operation
SessionsListSessionsHandler sessions.ListSessionsHandler
// AuthLogoutHandler sets the operation handler for the logout operation
AuthLogoutHandler auth.LogoutHandler
// PingPingHandler sets the operation handler for the ping operation
PingPingHandler ping.PingHandler
// SessionsReplaySessionHandler sets the operation handler for the replay session operation
SessionsReplaySessionHandler sessions.ReplaySessionHandler
// 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
}
EntryAPI the entry API
func NewEntryAPI ¶
NewEntryAPI creates a new Entry instance
func (*EntryAPI) AuthenticatorsFor ¶
func (o *EntryAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*EntryAPI) Authorizer ¶
func (o *EntryAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*EntryAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types
func (*EntryAPI) Context ¶
func (o *EntryAPI) Context() *middleware.Context
Context returns the middleware context for the entry API
func (*EntryAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*EntryAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*EntryAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*EntryAPI) Init ¶
func (o *EntryAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*EntryAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types
func (*EntryAPI) RegisterConsumer ¶
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*EntryAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*EntryAPI) RegisterProducer ¶
RegisterProducer allows you to add (or override) a producer for a media type.
func (*EntryAPI) Serve ¶
func (o *EntryAPI) 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 (*EntryAPI) ServeErrorFor ¶
func (o *EntryAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*EntryAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*EntryAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type