operations

package
v0.0.0-...-ea7eeef Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KuberlogicAPI

type KuberlogicAPI 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

	// JSONProducer registers a producer for the following mime types:
	//   - application/json
	JSONProducer runtime.Producer

	// BearerAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key Authorization provided in the header
	BearerAuth func(string) (*models.Principal, error)

	// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
	APIAuthorizer runtime.Authorizer

	// ServiceBackupConfigCreateHandler sets the operation handler for the backup config create operation
	ServiceBackupConfigCreateHandler service.BackupConfigCreateHandler
	// ServiceBackupConfigDeleteHandler sets the operation handler for the backup config delete operation
	ServiceBackupConfigDeleteHandler service.BackupConfigDeleteHandler
	// ServiceBackupConfigEditHandler sets the operation handler for the backup config edit operation
	ServiceBackupConfigEditHandler service.BackupConfigEditHandler
	// ServiceBackupConfigGetHandler sets the operation handler for the backup config get operation
	ServiceBackupConfigGetHandler service.BackupConfigGetHandler
	// ServiceBackupListHandler sets the operation handler for the backup list operation
	ServiceBackupListHandler service.BackupListHandler
	// ServiceDatabaseCreateHandler sets the operation handler for the database create operation
	ServiceDatabaseCreateHandler service.DatabaseCreateHandler
	// ServiceDatabaseDeleteHandler sets the operation handler for the database delete operation
	ServiceDatabaseDeleteHandler service.DatabaseDeleteHandler
	// ServiceDatabaseListHandler sets the operation handler for the database list operation
	ServiceDatabaseListHandler service.DatabaseListHandler
	// ServiceDatabaseRestoreHandler sets the operation handler for the database restore operation
	ServiceDatabaseRestoreHandler service.DatabaseRestoreHandler
	// AuthLoginUserHandler sets the operation handler for the login user operation
	AuthLoginUserHandler auth.LoginUserHandler
	// ServiceLogsGetHandler sets the operation handler for the logs get operation
	ServiceLogsGetHandler service.LogsGetHandler
	// ServiceRestoreListHandler sets the operation handler for the restore list operation
	ServiceRestoreListHandler service.RestoreListHandler
	// ServiceServiceAddHandler sets the operation handler for the service add operation
	ServiceServiceAddHandler service.ServiceAddHandler
	// ServiceServiceDeleteHandler sets the operation handler for the service delete operation
	ServiceServiceDeleteHandler service.ServiceDeleteHandler
	// ServiceServiceEditHandler sets the operation handler for the service edit operation
	ServiceServiceEditHandler service.ServiceEditHandler
	// ServiceServiceGetHandler sets the operation handler for the service get operation
	ServiceServiceGetHandler service.ServiceGetHandler
	// ServiceServiceListHandler sets the operation handler for the service list operation
	ServiceServiceListHandler service.ServiceListHandler
	// ServiceUserCreateHandler sets the operation handler for the user create operation
	ServiceUserCreateHandler service.UserCreateHandler
	// ServiceUserDeleteHandler sets the operation handler for the user delete operation
	ServiceUserDeleteHandler service.UserDeleteHandler
	// ServiceUserEditHandler sets the operation handler for the user edit operation
	ServiceUserEditHandler service.UserEditHandler
	// ServiceUserListHandler sets the operation handler for the user list operation
	ServiceUserListHandler service.UserListHandler
	// 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
}

KuberlogicAPI This is a service API

func NewKuberlogicAPI

func NewKuberlogicAPI(spec *loads.Document) *KuberlogicAPI

NewKuberlogicAPI creates a new Kuberlogic instance

func (*KuberlogicAPI) AddMiddlewareFor

func (o *KuberlogicAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)

AddMiddlewareFor adds a http middleware to existing handler

func (*KuberlogicAPI) AuthenticatorsFor

func (o *KuberlogicAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*KuberlogicAPI) Authorizer

func (o *KuberlogicAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*KuberlogicAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.

func (*KuberlogicAPI) Context

func (o *KuberlogicAPI) Context() *middleware.Context

Context returns the middleware context for the kuberlogic API

func (*KuberlogicAPI) DefaultConsumes

func (o *KuberlogicAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*KuberlogicAPI) DefaultProduces

func (o *KuberlogicAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*KuberlogicAPI) Formats

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

Formats returns the registered string formats

func (*KuberlogicAPI) HandlerFor

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

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

func (*KuberlogicAPI) Init

func (o *KuberlogicAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*KuberlogicAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.

func (*KuberlogicAPI) RegisterConsumer

func (o *KuberlogicAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*KuberlogicAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*KuberlogicAPI) RegisterProducer

func (o *KuberlogicAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*KuberlogicAPI) Serve

func (o *KuberlogicAPI) 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 (*KuberlogicAPI) ServeErrorFor

func (o *KuberlogicAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*KuberlogicAPI) SetDefaultConsumes

func (o *KuberlogicAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*KuberlogicAPI) SetDefaultProduces

func (o *KuberlogicAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*KuberlogicAPI) SetSpec

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

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

func (*KuberlogicAPI) UseRedoc

func (o *KuberlogicAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*KuberlogicAPI) UseSwaggerUI

func (o *KuberlogicAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*KuberlogicAPI) Validate

func (o *KuberlogicAPI) Validate() error

Validate validates the registrations in the KuberlogicAPI

Directories

Path Synopsis
Code generated by go-swagger; DO NOT EDIT.
Code generated by go-swagger; DO NOT EDIT.
Code generated by go-swagger; DO NOT EDIT.
Code generated by go-swagger; DO NOT EDIT.

Jump to

Keyboard shortcuts

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