operations

package
v0.0.0-...-d92d8b1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ProduceEventsInternalServerErrorCode int = 500

ProduceEventsInternalServerErrorCode is the HTTP code returned for type ProduceEventsInternalServerError

View Source
const ProduceEventsOKCode int = 200

ProduceEventsOKCode is the HTTP code returned for type ProduceEventsOK

View Source
const ProduceEventsUnprocessableEntityCode int = 422

ProduceEventsUnprocessableEntityCode is the HTTP code returned for type ProduceEventsUnprocessableEntity

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsEnricherAPI

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

	// ProduceEventsHandler sets the operation handler for the produce events operation
	ProduceEventsHandler ProduceEventsHandler
	// 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
}

EventsEnricherAPI Clickhouse proxy events microservice

func NewEventsEnricherAPI

func NewEventsEnricherAPI(spec *loads.Document) *EventsEnricherAPI

NewEventsEnricherAPI creates a new EventsEnricher instance

func (*EventsEnricherAPI) AddMiddlewareFor

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

AddMiddlewareFor adds a http middleware to existing handler

func (*EventsEnricherAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*EventsEnricherAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*EventsEnricherAPI) ConsumersFor

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

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

func (*EventsEnricherAPI) Context

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

Context returns the middleware context for the events enricher API

func (*EventsEnricherAPI) DefaultConsumes

func (o *EventsEnricherAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*EventsEnricherAPI) DefaultProduces

func (o *EventsEnricherAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*EventsEnricherAPI) Formats

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

Formats returns the registered string formats

func (*EventsEnricherAPI) HandlerFor

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

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

func (*EventsEnricherAPI) Init

func (o *EventsEnricherAPI) Init()

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

func (*EventsEnricherAPI) ProducersFor

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

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

func (*EventsEnricherAPI) RegisterConsumer

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

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

func (*EventsEnricherAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*EventsEnricherAPI) RegisterProducer

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

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

func (*EventsEnricherAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*EventsEnricherAPI) SetDefaultConsumes

func (o *EventsEnricherAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*EventsEnricherAPI) SetDefaultProduces

func (o *EventsEnricherAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*EventsEnricherAPI) SetSpec

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

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

func (*EventsEnricherAPI) Validate

func (o *EventsEnricherAPI) Validate() error

Validate validates the registrations in the EventsEnricherAPI

type ProduceEvents

type ProduceEvents struct {
	Context *middleware.Context
	Handler ProduceEventsHandler
}

ProduceEvents swagger:route POST /v1/events/produce produceEvents

Produce new events

func NewProduceEvents

func NewProduceEvents(ctx *middleware.Context, handler ProduceEventsHandler) *ProduceEvents

NewProduceEvents creates a new http.Handler for the produce events operation

func (*ProduceEvents) ServeHTTP

func (o *ProduceEvents) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ProduceEventsHandler

type ProduceEventsHandler interface {
	Handle(ProduceEventsParams) middleware.Responder
}

ProduceEventsHandler interface for that can handle valid produce events params

type ProduceEventsHandlerFunc

type ProduceEventsHandlerFunc func(ProduceEventsParams) middleware.Responder

ProduceEventsHandlerFunc turns a function with the right signature into a produce events handler

func (ProduceEventsHandlerFunc) Handle

Handle executing the request and returning a response

type ProduceEventsInternalServerError

type ProduceEventsInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
}

ProduceEventsInternalServerError Internal Server Error

swagger:response produceEventsInternalServerError

func NewProduceEventsInternalServerError

func NewProduceEventsInternalServerError() *ProduceEventsInternalServerError

NewProduceEventsInternalServerError creates ProduceEventsInternalServerError with default headers values

func (*ProduceEventsInternalServerError) SetPayload

func (o *ProduceEventsInternalServerError) SetPayload(payload *models.Error)

SetPayload sets the payload to the produce events internal server error response

func (*ProduceEventsInternalServerError) WithPayload

WithPayload adds the payload to the produce events internal server error response

func (*ProduceEventsInternalServerError) WriteResponse

func (o *ProduceEventsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ProduceEventsOK

type ProduceEventsOK struct {

	/*
	  In: Body
	*/
	Payload *models.ProduceEventsResponse `json:"body,omitempty"`
}

ProduceEventsOK Success

swagger:response produceEventsOK

func NewProduceEventsOK

func NewProduceEventsOK() *ProduceEventsOK

NewProduceEventsOK creates ProduceEventsOK with default headers values

func (*ProduceEventsOK) SetPayload

func (o *ProduceEventsOK) SetPayload(payload *models.ProduceEventsResponse)

SetPayload sets the payload to the produce events o k response

func (*ProduceEventsOK) WithPayload

func (o *ProduceEventsOK) WithPayload(payload *models.ProduceEventsResponse) *ProduceEventsOK

WithPayload adds the payload to the produce events o k response

func (*ProduceEventsOK) WriteResponse

func (o *ProduceEventsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ProduceEventsParams

type ProduceEventsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  In: body
	*/
	Payload *models.ProduceEventsPayload
}

ProduceEventsParams contains all the bound params for the produce events operation typically these are obtained from a http.Request

swagger:parameters produceEvents

func NewProduceEventsParams

func NewProduceEventsParams() ProduceEventsParams

NewProduceEventsParams creates a new ProduceEventsParams object no default values defined in spec.

func (*ProduceEventsParams) BindRequest

func (o *ProduceEventsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewProduceEventsParams() beforehand.

type ProduceEventsURL

type ProduceEventsURL struct {
	// contains filtered or unexported fields
}

ProduceEventsURL generates an URL for the produce events operation

func (*ProduceEventsURL) Build

func (o *ProduceEventsURL) Build() (*url.URL, error)

Build a url path and query string

func (*ProduceEventsURL) BuildFull

func (o *ProduceEventsURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ProduceEventsURL) Must

func (o *ProduceEventsURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ProduceEventsURL) SetBasePath

func (o *ProduceEventsURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ProduceEventsURL) String

func (o *ProduceEventsURL) String() string

String returns the string representation of the path with query string

func (*ProduceEventsURL) StringFull

func (o *ProduceEventsURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ProduceEventsURL) WithBasePath

func (o *ProduceEventsURL) WithBasePath(bp string) *ProduceEventsURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type ProduceEventsUnprocessableEntity

type ProduceEventsUnprocessableEntity struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
}

ProduceEventsUnprocessableEntity Unprocessable Entity

swagger:response produceEventsUnprocessableEntity

func NewProduceEventsUnprocessableEntity

func NewProduceEventsUnprocessableEntity() *ProduceEventsUnprocessableEntity

NewProduceEventsUnprocessableEntity creates ProduceEventsUnprocessableEntity with default headers values

func (*ProduceEventsUnprocessableEntity) SetPayload

func (o *ProduceEventsUnprocessableEntity) SetPayload(payload *models.Error)

SetPayload sets the payload to the produce events unprocessable entity response

func (*ProduceEventsUnprocessableEntity) WithPayload

WithPayload adds the payload to the produce events unprocessable entity response

func (*ProduceEventsUnprocessableEntity) WriteResponse

func (o *ProduceEventsUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

Jump to

Keyboard shortcuts

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