operations

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const PostSpansAcceptedCode int = 202

PostSpansAcceptedCode is the HTTP code returned for type PostSpansAccepted

Variables

This section is empty.

Functions

This section is empty.

Types

type PostSpans

type PostSpans struct {
	Context *middleware.Context
	Handler PostSpansHandler
}
PostSpans swagger:route POST /spans postSpans

Uploads a list of spans encoded per content-type, for example json.

func NewPostSpans

func NewPostSpans(ctx *middleware.Context, handler PostSpansHandler) *PostSpans

NewPostSpans creates a new http.Handler for the post spans operation

func (*PostSpans) ServeHTTP

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

type PostSpansAccepted

type PostSpansAccepted struct {
}

PostSpansAccepted Accepted

swagger:response postSpansAccepted

func NewPostSpansAccepted

func NewPostSpansAccepted() *PostSpansAccepted

NewPostSpansAccepted creates PostSpansAccepted with default headers values

func (*PostSpansAccepted) WriteResponse

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

WriteResponse to the client

type PostSpansHandler

type PostSpansHandler interface {
	Handle(PostSpansParams) middleware.Responder
}

PostSpansHandler interface for that can handle valid post spans params

type PostSpansHandlerFunc

type PostSpansHandlerFunc func(PostSpansParams) middleware.Responder

PostSpansHandlerFunc turns a function with the right signature into a post spans handler

func (PostSpansHandlerFunc) Handle

Handle executing the request and returning a response

type PostSpansParams

type PostSpansParams struct {

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

	/*A list of spans that belong to any trace.
	  Required: true
	  In: body
	*/
	Spans models.ListOfSpans
}

PostSpansParams contains all the bound params for the post spans operation typically these are obtained from a http.Request

swagger:parameters PostSpans

func NewPostSpansParams

func NewPostSpansParams() PostSpansParams

NewPostSpansParams creates a new PostSpansParams object

There are no default values defined in the spec.

func (*PostSpansParams) BindRequest

func (o *PostSpansParams) 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 NewPostSpansParams() beforehand.

type ZipkinAPI

type ZipkinAPI struct {
	Middleware func(middleware.Builder) http.Handler

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implemention 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 implemention 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 implemention 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 a "application/json" mime type
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for a "application/json" mime type
	JSONProducer runtime.Producer

	// PostSpansHandler sets the operation handler for the post spans operation
	PostSpansHandler PostSpansHandler

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

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

ZipkinAPI Zipkin's v2 api currently includes a POST endpoint that can receive spans.

func NewZipkinAPI

func NewZipkinAPI(spec *loads.Document) *ZipkinAPI

NewZipkinAPI creates a new Zipkin instance

func (*ZipkinAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*ZipkinAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*ZipkinAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*ZipkinAPI) Context

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

Context returns the middleware context for the zipkin API

func (*ZipkinAPI) DefaultConsumes

func (o *ZipkinAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*ZipkinAPI) DefaultProduces

func (o *ZipkinAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*ZipkinAPI) Formats

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

Formats returns the registered string formats

func (*ZipkinAPI) HandlerFor

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

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

func (*ZipkinAPI) Init

func (o *ZipkinAPI) Init()

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

func (*ZipkinAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*ZipkinAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*ZipkinAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*ZipkinAPI) SetDefaultConsumes

func (o *ZipkinAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*ZipkinAPI) SetDefaultProduces

func (o *ZipkinAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*ZipkinAPI) SetSpec

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

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

func (*ZipkinAPI) Validate

func (o *ZipkinAPI) Validate() error

Validate validates the registrations in the ZipkinAPI

type ZipkinAPIAPI added in v1.23.0

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

	// PostSpansHandler sets the operation handler for the post spans operation
	PostSpansHandler PostSpansHandler

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

ZipkinAPIAPI Zipkin's v2 api currently includes a POST endpoint that can receive spans.

func NewZipkinAPIAPI added in v1.23.0

func NewZipkinAPIAPI(spec *loads.Document) *ZipkinAPIAPI

NewZipkinAPIAPI creates a new ZipkinAPI instance

func (*ZipkinAPIAPI) AddMiddlewareFor added in v1.23.0

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

AddMiddlewareFor adds a http middleware to existing handler

func (*ZipkinAPIAPI) AuthenticatorsFor added in v1.23.0

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*ZipkinAPIAPI) Authorizer added in v1.23.0

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

Authorizer returns the registered authorizer

func (*ZipkinAPIAPI) ConsumersFor added in v1.23.0

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

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

func (*ZipkinAPIAPI) Context added in v1.23.0

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

Context returns the middleware context for the zipkin API API

func (*ZipkinAPIAPI) DefaultConsumes added in v1.23.0

func (o *ZipkinAPIAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*ZipkinAPIAPI) DefaultProduces added in v1.23.0

func (o *ZipkinAPIAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*ZipkinAPIAPI) Formats added in v1.23.0

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

Formats returns the registered string formats

func (*ZipkinAPIAPI) HandlerFor added in v1.23.0

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

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

func (*ZipkinAPIAPI) Init added in v1.23.0

func (o *ZipkinAPIAPI) Init()

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

func (*ZipkinAPIAPI) ProducersFor added in v1.23.0

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

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

func (*ZipkinAPIAPI) RegisterConsumer added in v1.23.0

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

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

func (*ZipkinAPIAPI) RegisterFormat added in v1.23.0

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

RegisterFormat registers a custom format validator

func (*ZipkinAPIAPI) RegisterProducer added in v1.23.0

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

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

func (*ZipkinAPIAPI) Serve added in v1.23.0

func (o *ZipkinAPIAPI) 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 (*ZipkinAPIAPI) ServeErrorFor added in v1.23.0

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

ServeErrorFor gets a error handler for a given operation id

func (*ZipkinAPIAPI) SetDefaultConsumes added in v1.23.0

func (o *ZipkinAPIAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*ZipkinAPIAPI) SetDefaultProduces added in v1.23.0

func (o *ZipkinAPIAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*ZipkinAPIAPI) SetSpec added in v1.23.0

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

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

func (*ZipkinAPIAPI) UseRedoc added in v1.23.0

func (o *ZipkinAPIAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*ZipkinAPIAPI) UseSwaggerUI added in v1.23.0

func (o *ZipkinAPIAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*ZipkinAPIAPI) Validate added in v1.23.0

func (o *ZipkinAPIAPI) Validate() error

Validate validates the registrations in the ZipkinAPIAPI

Jump to

Keyboard shortcuts

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