operations

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: AGPL-3.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 OperatorAPI

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

	// KeyAuth registers a function that takes an access token and a collection of required scopes and returns a principal
	// it performs authentication based on an oauth2 bearer token provided in the request
	KeyAuth func(string, []string) (*models.Principal, error)

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

	// UserAPICheckMinIOVersionHandler sets the operation handler for the check min i o version operation
	UserAPICheckMinIOVersionHandler user_api.CheckMinIOVersionHandler
	// OperatorAPICreateNamespaceHandler sets the operation handler for the create namespace operation
	OperatorAPICreateNamespaceHandler operator_api.CreateNamespaceHandler
	// OperatorAPICreateTenantHandler sets the operation handler for the create tenant operation
	OperatorAPICreateTenantHandler operator_api.CreateTenantHandler
	// OperatorAPIDeletePVCHandler sets the operation handler for the delete p v c operation
	OperatorAPIDeletePVCHandler operator_api.DeletePVCHandler
	// OperatorAPIDeletePodHandler sets the operation handler for the delete pod operation
	OperatorAPIDeletePodHandler operator_api.DeletePodHandler
	// OperatorAPIDeleteTenantHandler sets the operation handler for the delete tenant operation
	OperatorAPIDeleteTenantHandler operator_api.DeleteTenantHandler
	// OperatorAPIDescribePodHandler sets the operation handler for the describe pod operation
	OperatorAPIDescribePodHandler operator_api.DescribePodHandler
	// OperatorAPIDirectPVFormatDriveHandler sets the operation handler for the direct p v format drive operation
	OperatorAPIDirectPVFormatDriveHandler operator_api.DirectPVFormatDriveHandler
	// OperatorAPIDisableTenantLoggingHandler sets the operation handler for the disable tenant logging operation
	OperatorAPIDisableTenantLoggingHandler operator_api.DisableTenantLoggingHandler
	// OperatorAPIEnableTenantLoggingHandler sets the operation handler for the enable tenant logging operation
	OperatorAPIEnableTenantLoggingHandler operator_api.EnableTenantLoggingHandler
	// OperatorAPIGetAllocatableResourcesHandler sets the operation handler for the get allocatable resources operation
	OperatorAPIGetAllocatableResourcesHandler operator_api.GetAllocatableResourcesHandler
	// OperatorAPIGetDirectPVDriveListHandler sets the operation handler for the get direct p v drive list operation
	OperatorAPIGetDirectPVDriveListHandler operator_api.GetDirectPVDriveListHandler
	// OperatorAPIGetDirectPVVolumeListHandler sets the operation handler for the get direct p v volume list operation
	OperatorAPIGetDirectPVVolumeListHandler operator_api.GetDirectPVVolumeListHandler
	// OperatorAPIGetMPIntegrationHandler sets the operation handler for the get m p integration operation
	OperatorAPIGetMPIntegrationHandler operator_api.GetMPIntegrationHandler
	// OperatorAPIGetMaxAllocatableMemHandler sets the operation handler for the get max allocatable mem operation
	OperatorAPIGetMaxAllocatableMemHandler operator_api.GetMaxAllocatableMemHandler
	// OperatorAPIGetPVCDescribeHandler sets the operation handler for the get p v c describe operation
	OperatorAPIGetPVCDescribeHandler operator_api.GetPVCDescribeHandler
	// OperatorAPIGetPVCEventsHandler sets the operation handler for the get p v c events operation
	OperatorAPIGetPVCEventsHandler operator_api.GetPVCEventsHandler
	// OperatorAPIGetParityHandler sets the operation handler for the get parity operation
	OperatorAPIGetParityHandler operator_api.GetParityHandler
	// OperatorAPIGetPodEventsHandler sets the operation handler for the get pod events operation
	OperatorAPIGetPodEventsHandler operator_api.GetPodEventsHandler
	// OperatorAPIGetPodLogsHandler sets the operation handler for the get pod logs operation
	OperatorAPIGetPodLogsHandler operator_api.GetPodLogsHandler
	// OperatorAPIGetResourceQuotaHandler sets the operation handler for the get resource quota operation
	OperatorAPIGetResourceQuotaHandler operator_api.GetResourceQuotaHandler
	// OperatorAPIGetTenantEventsHandler sets the operation handler for the get tenant events operation
	OperatorAPIGetTenantEventsHandler operator_api.GetTenantEventsHandler
	// OperatorAPIGetTenantLogsHandler sets the operation handler for the get tenant logs operation
	OperatorAPIGetTenantLogsHandler operator_api.GetTenantLogsHandler
	// OperatorAPIGetTenantMonitoringHandler sets the operation handler for the get tenant monitoring operation
	OperatorAPIGetTenantMonitoringHandler operator_api.GetTenantMonitoringHandler
	// OperatorAPIGetTenantPodsHandler sets the operation handler for the get tenant pods operation
	OperatorAPIGetTenantPodsHandler operator_api.GetTenantPodsHandler
	// OperatorAPIGetTenantUsageHandler sets the operation handler for the get tenant usage operation
	OperatorAPIGetTenantUsageHandler operator_api.GetTenantUsageHandler
	// OperatorAPIGetTenantYAMLHandler sets the operation handler for the get tenant y a m l operation
	OperatorAPIGetTenantYAMLHandler operator_api.GetTenantYAMLHandler
	// OperatorAPIListAllTenantsHandler sets the operation handler for the list all tenants operation
	OperatorAPIListAllTenantsHandler operator_api.ListAllTenantsHandler
	// OperatorAPIListNodeLabelsHandler sets the operation handler for the list node labels operation
	OperatorAPIListNodeLabelsHandler operator_api.ListNodeLabelsHandler
	// OperatorAPIListPVCsHandler sets the operation handler for the list p v cs operation
	OperatorAPIListPVCsHandler operator_api.ListPVCsHandler
	// OperatorAPIListPVCsForTenantHandler sets the operation handler for the list p v cs for tenant operation
	OperatorAPIListPVCsForTenantHandler operator_api.ListPVCsForTenantHandler
	// OperatorAPIListTenantCertificateSigningRequestHandler sets the operation handler for the list tenant certificate signing request operation
	OperatorAPIListTenantCertificateSigningRequestHandler operator_api.ListTenantCertificateSigningRequestHandler
	// OperatorAPIListTenantsHandler sets the operation handler for the list tenants operation
	OperatorAPIListTenantsHandler operator_api.ListTenantsHandler
	// AuthLoginDetailHandler sets the operation handler for the login detail operation
	AuthLoginDetailHandler auth.LoginDetailHandler
	// AuthLoginOauth2AuthHandler sets the operation handler for the login oauth2 auth operation
	AuthLoginOauth2AuthHandler auth.LoginOauth2AuthHandler
	// AuthLoginOperatorHandler sets the operation handler for the login operator operation
	AuthLoginOperatorHandler auth.LoginOperatorHandler
	// AuthLogoutHandler sets the operation handler for the logout operation
	AuthLogoutHandler auth.LogoutHandler
	// OperatorAPIOperatorSubnetAPIKeyInfoHandler sets the operation handler for the operator subnet API key info operation
	OperatorAPIOperatorSubnetAPIKeyInfoHandler operator_api.OperatorSubnetAPIKeyInfoHandler
	// OperatorAPIOperatorSubnetAPIKeyHandler sets the operation handler for the operator subnet Api key operation
	OperatorAPIOperatorSubnetAPIKeyHandler operator_api.OperatorSubnetAPIKeyHandler
	// OperatorAPIOperatorSubnetLoginHandler sets the operation handler for the operator subnet login operation
	OperatorAPIOperatorSubnetLoginHandler operator_api.OperatorSubnetLoginHandler
	// OperatorAPIOperatorSubnetLoginMFAHandler sets the operation handler for the operator subnet login m f a operation
	OperatorAPIOperatorSubnetLoginMFAHandler operator_api.OperatorSubnetLoginMFAHandler
	// OperatorAPIOperatorSubnetRegisterAPIKeyHandler sets the operation handler for the operator subnet register API key operation
	OperatorAPIOperatorSubnetRegisterAPIKeyHandler operator_api.OperatorSubnetRegisterAPIKeyHandler
	// OperatorAPIPostMPIntegrationHandler sets the operation handler for the post m p integration operation
	OperatorAPIPostMPIntegrationHandler operator_api.PostMPIntegrationHandler
	// OperatorAPIPutTenantYAMLHandler sets the operation handler for the put tenant y a m l operation
	OperatorAPIPutTenantYAMLHandler operator_api.PutTenantYAMLHandler
	// AuthSessionCheckHandler sets the operation handler for the session check operation
	AuthSessionCheckHandler auth.SessionCheckHandler
	// OperatorAPISetTenantAdministratorsHandler sets the operation handler for the set tenant administrators operation
	OperatorAPISetTenantAdministratorsHandler operator_api.SetTenantAdministratorsHandler
	// OperatorAPISetTenantLogsHandler sets the operation handler for the set tenant logs operation
	OperatorAPISetTenantLogsHandler operator_api.SetTenantLogsHandler
	// OperatorAPISetTenantMonitoringHandler sets the operation handler for the set tenant monitoring operation
	OperatorAPISetTenantMonitoringHandler operator_api.SetTenantMonitoringHandler
	// OperatorAPISubscriptionActivateHandler sets the operation handler for the subscription activate operation
	OperatorAPISubscriptionActivateHandler operator_api.SubscriptionActivateHandler
	// OperatorAPISubscriptionInfoHandler sets the operation handler for the subscription info operation
	OperatorAPISubscriptionInfoHandler operator_api.SubscriptionInfoHandler
	// OperatorAPISubscriptionRefreshHandler sets the operation handler for the subscription refresh operation
	OperatorAPISubscriptionRefreshHandler operator_api.SubscriptionRefreshHandler
	// OperatorAPISubscriptionValidateHandler sets the operation handler for the subscription validate operation
	OperatorAPISubscriptionValidateHandler operator_api.SubscriptionValidateHandler
	// OperatorAPITenantAddPoolHandler sets the operation handler for the tenant add pool operation
	OperatorAPITenantAddPoolHandler operator_api.TenantAddPoolHandler
	// OperatorAPITenantConfigurationHandler sets the operation handler for the tenant configuration operation
	OperatorAPITenantConfigurationHandler operator_api.TenantConfigurationHandler
	// OperatorAPITenantDeleteEncryptionHandler sets the operation handler for the tenant delete encryption operation
	OperatorAPITenantDeleteEncryptionHandler operator_api.TenantDeleteEncryptionHandler
	// OperatorAPITenantDetailsHandler sets the operation handler for the tenant details operation
	OperatorAPITenantDetailsHandler operator_api.TenantDetailsHandler
	// OperatorAPITenantEncryptionInfoHandler sets the operation handler for the tenant encryption info operation
	OperatorAPITenantEncryptionInfoHandler operator_api.TenantEncryptionInfoHandler
	// OperatorAPITenantIdentityProviderHandler sets the operation handler for the tenant identity provider operation
	OperatorAPITenantIdentityProviderHandler operator_api.TenantIdentityProviderHandler
	// OperatorAPITenantSecurityHandler sets the operation handler for the tenant security operation
	OperatorAPITenantSecurityHandler operator_api.TenantSecurityHandler
	// OperatorAPITenantUpdateCertificateHandler sets the operation handler for the tenant update certificate operation
	OperatorAPITenantUpdateCertificateHandler operator_api.TenantUpdateCertificateHandler
	// OperatorAPITenantUpdateEncryptionHandler sets the operation handler for the tenant update encryption operation
	OperatorAPITenantUpdateEncryptionHandler operator_api.TenantUpdateEncryptionHandler
	// OperatorAPITenantUpdatePoolsHandler sets the operation handler for the tenant update pools operation
	OperatorAPITenantUpdatePoolsHandler operator_api.TenantUpdatePoolsHandler
	// OperatorAPIUpdateTenantHandler sets the operation handler for the update tenant operation
	OperatorAPIUpdateTenantHandler operator_api.UpdateTenantHandler
	// OperatorAPIUpdateTenantConfigurationHandler sets the operation handler for the update tenant configuration operation
	OperatorAPIUpdateTenantConfigurationHandler operator_api.UpdateTenantConfigurationHandler
	// OperatorAPIUpdateTenantDomainsHandler sets the operation handler for the update tenant domains operation
	OperatorAPIUpdateTenantDomainsHandler operator_api.UpdateTenantDomainsHandler
	// OperatorAPIUpdateTenantIdentityProviderHandler sets the operation handler for the update tenant identity provider operation
	OperatorAPIUpdateTenantIdentityProviderHandler operator_api.UpdateTenantIdentityProviderHandler
	// OperatorAPIUpdateTenantSecurityHandler sets the operation handler for the update tenant security operation
	OperatorAPIUpdateTenantSecurityHandler operator_api.UpdateTenantSecurityHandler

	// 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
}

OperatorAPI the operator API

func NewOperatorAPI

func NewOperatorAPI(spec *loads.Document) *OperatorAPI

NewOperatorAPI creates a new Operator instance

func (*OperatorAPI) AddMiddlewareFor

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

AddMiddlewareFor adds a http middleware to existing handler

func (*OperatorAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*OperatorAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*OperatorAPI) ConsumersFor

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

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

func (*OperatorAPI) Context

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

Context returns the middleware context for the operator API

func (*OperatorAPI) DefaultConsumes

func (o *OperatorAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*OperatorAPI) DefaultProduces

func (o *OperatorAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*OperatorAPI) Formats

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

Formats returns the registered string formats

func (*OperatorAPI) HandlerFor

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

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

func (*OperatorAPI) Init

func (o *OperatorAPI) Init()

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

func (*OperatorAPI) ProducersFor

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

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

func (*OperatorAPI) RegisterConsumer

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

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

func (*OperatorAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*OperatorAPI) RegisterProducer

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

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

func (*OperatorAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*OperatorAPI) SetDefaultConsumes

func (o *OperatorAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*OperatorAPI) SetDefaultProduces

func (o *OperatorAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*OperatorAPI) SetSpec

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

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

func (*OperatorAPI) UseRedoc

func (o *OperatorAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*OperatorAPI) UseSwaggerUI

func (o *OperatorAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*OperatorAPI) Validate

func (o *OperatorAPI) Validate() error

Validate validates the registrations in the OperatorAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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