operations

package
v0.0.0-...-33e56a9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerDatabaseManagementAPI

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

	// APIKeyHeaderAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key X-API-KEY provided in the header
	APIKeyHeaderAuth func(string) (interface{}, error)

	// APIKeyParamAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key api_key provided in the query
	APIKeyParamAuth func(string) (interface{}, error)

	// KeycloakAuth 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
	KeycloakAuth func(string, []string) (interface{}, error)

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

	// CustomerManagementAddCustomerHandler sets the operation handler for the add customer operation
	CustomerManagementAddCustomerHandler customer_management.AddCustomerHandler
	// ProductManagementAddProductHandler sets the operation handler for the add product operation
	ProductManagementAddProductHandler product_management.AddProductHandler
	// ResellerManagementAddResellerHandler sets the operation handler for the add reseller operation
	ResellerManagementAddResellerHandler reseller_management.AddResellerHandler
	// TriggerManagementExecSampleHandler sets the operation handler for the exec sample operation
	TriggerManagementExecSampleHandler trigger_management.ExecSampleHandler
	// CustomerManagementGetCustomerHandler sets the operation handler for the get customer operation
	CustomerManagementGetCustomerHandler customer_management.GetCustomerHandler
	// ProductManagementGetProductHandler sets the operation handler for the get product operation
	ProductManagementGetProductHandler product_management.GetProductHandler
	// ResellerManagementGetResellerHandler sets the operation handler for the get reseller operation
	ResellerManagementGetResellerHandler reseller_management.GetResellerHandler
	// StatusManagementGetStatusHandler sets the operation handler for the get status operation
	StatusManagementGetStatusHandler status_management.GetStatusHandler
	// CustomerManagementListCustomersHandler sets the operation handler for the list customers operation
	CustomerManagementListCustomersHandler customer_management.ListCustomersHandler
	// ProductManagementListProductsHandler sets the operation handler for the list products operation
	ProductManagementListProductsHandler product_management.ListProductsHandler
	// ResellerManagementListResellersHandler sets the operation handler for the list resellers operation
	ResellerManagementListResellersHandler reseller_management.ListResellersHandler
	// StatusManagementShowStatusHandler sets the operation handler for the show status operation
	StatusManagementShowStatusHandler status_management.ShowStatusHandler
	// CustomerManagementUpdateCustomerHandler sets the operation handler for the update customer operation
	CustomerManagementUpdateCustomerHandler customer_management.UpdateCustomerHandler
	// ProductManagementUpdateProductHandler sets the operation handler for the update product operation
	ProductManagementUpdateProductHandler product_management.UpdateProductHandler
	// ResellerManagementUpdateResellerHandler sets the operation handler for the update reseller operation
	ResellerManagementUpdateResellerHandler reseller_management.UpdateResellerHandler
	// 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
}

CustomerDatabaseManagementAPI An API which supports creation, deletion, listing etc of customers and products

func NewCustomerDatabaseManagementAPI

func NewCustomerDatabaseManagementAPI(spec *loads.Document) *CustomerDatabaseManagementAPI

NewCustomerDatabaseManagementAPI creates a new CustomerDatabaseManagement instance

func (*CustomerDatabaseManagementAPI) AddMiddlewareFor

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

AddMiddlewareFor adds a http middleware to existing handler

func (*CustomerDatabaseManagementAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*CustomerDatabaseManagementAPI) Authorizer

Authorizer returns the registered authorizer

func (*CustomerDatabaseManagementAPI) ConsumersFor

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

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

func (*CustomerDatabaseManagementAPI) Context

Context returns the middleware context for the customer database management API

func (*CustomerDatabaseManagementAPI) DefaultConsumes

func (o *CustomerDatabaseManagementAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*CustomerDatabaseManagementAPI) DefaultProduces

func (o *CustomerDatabaseManagementAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*CustomerDatabaseManagementAPI) Formats

Formats returns the registered string formats

func (*CustomerDatabaseManagementAPI) HandlerFor

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

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

func (*CustomerDatabaseManagementAPI) Init

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

func (*CustomerDatabaseManagementAPI) ProducersFor

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

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

func (*CustomerDatabaseManagementAPI) RegisterConsumer

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

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

func (*CustomerDatabaseManagementAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*CustomerDatabaseManagementAPI) RegisterProducer

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

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

func (*CustomerDatabaseManagementAPI) Serve

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*CustomerDatabaseManagementAPI) ServeErrorFor

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

ServeErrorFor gets a error handler for a given operation id

func (*CustomerDatabaseManagementAPI) SetDefaultConsumes

func (o *CustomerDatabaseManagementAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*CustomerDatabaseManagementAPI) SetDefaultProduces

func (o *CustomerDatabaseManagementAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*CustomerDatabaseManagementAPI) SetSpec

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

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

func (*CustomerDatabaseManagementAPI) Validate

func (o *CustomerDatabaseManagementAPI) Validate() error

Validate validates the registrations in the CustomerDatabaseManagementAPI

Jump to

Keyboard shortcuts

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