operations

package
v0.24.34 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZitiFabricAPI

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

	// DatabaseCheckDataIntegrityHandler sets the operation handler for the check data integrity operation
	DatabaseCheckDataIntegrityHandler database.CheckDataIntegrityHandler
	// DatabaseCreateDatabaseSnapshotHandler sets the operation handler for the create database snapshot operation
	DatabaseCreateDatabaseSnapshotHandler database.CreateDatabaseSnapshotHandler
	// DatabaseCreateDatabaseSnapshotWithPathHandler sets the operation handler for the create database snapshot with path operation
	DatabaseCreateDatabaseSnapshotWithPathHandler database.CreateDatabaseSnapshotWithPathHandler
	// RouterCreateRouterHandler sets the operation handler for the create router operation
	RouterCreateRouterHandler router.CreateRouterHandler
	// ServiceCreateServiceHandler sets the operation handler for the create service operation
	ServiceCreateServiceHandler service.CreateServiceHandler
	// TerminatorCreateTerminatorHandler sets the operation handler for the create terminator operation
	TerminatorCreateTerminatorHandler terminator.CreateTerminatorHandler
	// DatabaseDataIntegrityResultsHandler sets the operation handler for the data integrity results operation
	DatabaseDataIntegrityResultsHandler database.DataIntegrityResultsHandler
	// CircuitDeleteCircuitHandler sets the operation handler for the delete circuit operation
	CircuitDeleteCircuitHandler circuit.DeleteCircuitHandler
	// LinkDeleteLinkHandler sets the operation handler for the delete link operation
	LinkDeleteLinkHandler link.DeleteLinkHandler
	// RouterDeleteRouterHandler sets the operation handler for the delete router operation
	RouterDeleteRouterHandler router.DeleteRouterHandler
	// ServiceDeleteServiceHandler sets the operation handler for the delete service operation
	ServiceDeleteServiceHandler service.DeleteServiceHandler
	// TerminatorDeleteTerminatorHandler sets the operation handler for the delete terminator operation
	TerminatorDeleteTerminatorHandler terminator.DeleteTerminatorHandler
	// CircuitDetailCircuitHandler sets the operation handler for the detail circuit operation
	CircuitDetailCircuitHandler circuit.DetailCircuitHandler
	// LinkDetailLinkHandler sets the operation handler for the detail link operation
	LinkDetailLinkHandler link.DetailLinkHandler
	// RouterDetailRouterHandler sets the operation handler for the detail router operation
	RouterDetailRouterHandler router.DetailRouterHandler
	// ServiceDetailServiceHandler sets the operation handler for the detail service operation
	ServiceDetailServiceHandler service.DetailServiceHandler
	// TerminatorDetailTerminatorHandler sets the operation handler for the detail terminator operation
	TerminatorDetailTerminatorHandler terminator.DetailTerminatorHandler
	// DatabaseFixDataIntegrityHandler sets the operation handler for the fix data integrity operation
	DatabaseFixDataIntegrityHandler database.FixDataIntegrityHandler
	// InspectInspectHandler sets the operation handler for the inspect operation
	InspectInspectHandler inspect.InspectHandler
	// CircuitListCircuitsHandler sets the operation handler for the list circuits operation
	CircuitListCircuitsHandler circuit.ListCircuitsHandler
	// LinkListLinksHandler sets the operation handler for the list links operation
	LinkListLinksHandler link.ListLinksHandler
	// RouterListRouterTerminatorsHandler sets the operation handler for the list router terminators operation
	RouterListRouterTerminatorsHandler router.ListRouterTerminatorsHandler
	// RouterListRoutersHandler sets the operation handler for the list routers operation
	RouterListRoutersHandler router.ListRoutersHandler
	// ServiceListServiceTerminatorsHandler sets the operation handler for the list service terminators operation
	ServiceListServiceTerminatorsHandler service.ListServiceTerminatorsHandler
	// ServiceListServicesHandler sets the operation handler for the list services operation
	ServiceListServicesHandler service.ListServicesHandler
	// TerminatorListTerminatorsHandler sets the operation handler for the list terminators operation
	TerminatorListTerminatorsHandler terminator.ListTerminatorsHandler
	// LinkPatchLinkHandler sets the operation handler for the patch link operation
	LinkPatchLinkHandler link.PatchLinkHandler
	// RouterPatchRouterHandler sets the operation handler for the patch router operation
	RouterPatchRouterHandler router.PatchRouterHandler
	// ServicePatchServiceHandler sets the operation handler for the patch service operation
	ServicePatchServiceHandler service.PatchServiceHandler
	// TerminatorPatchTerminatorHandler sets the operation handler for the patch terminator operation
	TerminatorPatchTerminatorHandler terminator.PatchTerminatorHandler
	// RaftRaftListMembersHandler sets the operation handler for the raft list members operation
	RaftRaftListMembersHandler raft.RaftListMembersHandler
	// RouterUpdateRouterHandler sets the operation handler for the update router operation
	RouterUpdateRouterHandler router.UpdateRouterHandler
	// ServiceUpdateServiceHandler sets the operation handler for the update service operation
	ServiceUpdateServiceHandler service.UpdateServiceHandler
	// TerminatorUpdateTerminatorHandler sets the operation handler for the update terminator operation
	TerminatorUpdateTerminatorHandler terminator.UpdateTerminatorHandler

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

ZitiFabricAPI OpenZiti Fabric API

func NewZitiFabricAPI

func NewZitiFabricAPI(spec *loads.Document) *ZitiFabricAPI

NewZitiFabricAPI creates a new ZitiFabric instance

func (*ZitiFabricAPI) AddMiddlewareFor

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

AddMiddlewareFor adds a http middleware to existing handler

func (*ZitiFabricAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*ZitiFabricAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*ZitiFabricAPI) ConsumersFor

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

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

func (*ZitiFabricAPI) Context

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

Context returns the middleware context for the ziti fabric API

func (*ZitiFabricAPI) DefaultConsumes

func (o *ZitiFabricAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*ZitiFabricAPI) DefaultProduces

func (o *ZitiFabricAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*ZitiFabricAPI) Formats

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

Formats returns the registered string formats

func (*ZitiFabricAPI) HandlerFor

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

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

func (*ZitiFabricAPI) Init

func (o *ZitiFabricAPI) Init()

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

func (*ZitiFabricAPI) ProducersFor

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

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

func (*ZitiFabricAPI) RegisterConsumer

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

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

func (*ZitiFabricAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*ZitiFabricAPI) RegisterProducer

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

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

func (*ZitiFabricAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*ZitiFabricAPI) SetDefaultConsumes

func (o *ZitiFabricAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*ZitiFabricAPI) SetDefaultProduces

func (o *ZitiFabricAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*ZitiFabricAPI) SetSpec

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

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

func (*ZitiFabricAPI) UseRedoc

func (o *ZitiFabricAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*ZitiFabricAPI) UseSwaggerUI

func (o *ZitiFabricAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*ZitiFabricAPI) Validate

func (o *ZitiFabricAPI) Validate() error

Validate validates the registrations in the ZitiFabricAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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