Documentation ¶
Index ¶
- type OperatorAPI
- func (o *OperatorAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *OperatorAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *OperatorAPI) Authorizer() runtime.Authorizer
- func (o *OperatorAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *OperatorAPI) Context() *middleware.Context
- func (o *OperatorAPI) DefaultConsumes() string
- func (o *OperatorAPI) DefaultProduces() string
- func (o *OperatorAPI) Formats() strfmt.Registry
- func (o *OperatorAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *OperatorAPI) Init()
- func (o *OperatorAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *OperatorAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *OperatorAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *OperatorAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *OperatorAPI) Serve(builder middleware.Builder) http.Handler
- func (o *OperatorAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *OperatorAPI) SetDefaultConsumes(mediaType string)
- func (o *OperatorAPI) SetDefaultProduces(mediaType string)
- func (o *OperatorAPI) SetSpec(spec *loads.Document)
- func (o *OperatorAPI) UseRedoc()
- func (o *OperatorAPI) UseSwaggerUI()
- func (o *OperatorAPI) Validate() error
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 // 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 // OperatorAPIGetMaxAllocatableMemHandler sets the operation handler for the get max allocatable mem operation OperatorAPIGetMaxAllocatableMemHandler operator_api.GetMaxAllocatableMemHandler // 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 // OperatorAPIListTenantsHandler sets the operation handler for the list tenants operation OperatorAPIListTenantsHandler operator_api.ListTenantsHandler // UserAPILoginDetailHandler sets the operation handler for the login detail operation UserAPILoginDetailHandler user_api.LoginDetailHandler // UserAPILoginOauth2AuthHandler sets the operation handler for the login oauth2 auth operation UserAPILoginOauth2AuthHandler user_api.LoginOauth2AuthHandler // UserAPILoginOperatorHandler sets the operation handler for the login operator operation UserAPILoginOperatorHandler user_api.LoginOperatorHandler // UserAPILogoutHandler sets the operation handler for the logout operation UserAPILogoutHandler user_api.LogoutHandler // OperatorAPIPutTenantYAMLHandler sets the operation handler for the put tenant y a m l operation OperatorAPIPutTenantYAMLHandler operator_api.PutTenantYAMLHandler // UserAPISessionCheckHandler sets the operation handler for the session check operation UserAPISessionCheckHandler user_api.SessionCheckHandler // 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 // 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 // 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 ¶
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) 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