Documentation ¶
Index ¶
- Constants
- type PostSpans
- type PostSpansAccepted
- type PostSpansHandler
- type PostSpansHandlerFunc
- type PostSpansParams
- type ZipkinAPI
- func (o *ZipkinAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *ZipkinAPI) Authorizer() runtime.Authorizer
- func (o *ZipkinAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *ZipkinAPI) Context() *middleware.Context
- func (o *ZipkinAPI) DefaultConsumes() string
- func (o *ZipkinAPI) DefaultProduces() string
- func (o *ZipkinAPI) Formats() strfmt.Registry
- func (o *ZipkinAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *ZipkinAPI) Init()
- func (o *ZipkinAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *ZipkinAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *ZipkinAPI) Serve(builder middleware.Builder) http.Handler
- func (o *ZipkinAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *ZipkinAPI) SetDefaultConsumes(mediaType string)
- func (o *ZipkinAPI) SetDefaultProduces(mediaType string)
- func (o *ZipkinAPI) SetSpec(spec *loads.Document)
- func (o *ZipkinAPI) Validate() error
- type ZipkinAPIAPI
- func (o *ZipkinAPIAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *ZipkinAPIAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *ZipkinAPIAPI) Authorizer() runtime.Authorizer
- func (o *ZipkinAPIAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *ZipkinAPIAPI) Context() *middleware.Context
- func (o *ZipkinAPIAPI) DefaultConsumes() string
- func (o *ZipkinAPIAPI) DefaultProduces() string
- func (o *ZipkinAPIAPI) Formats() strfmt.Registry
- func (o *ZipkinAPIAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *ZipkinAPIAPI) Init()
- func (o *ZipkinAPIAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *ZipkinAPIAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *ZipkinAPIAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *ZipkinAPIAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *ZipkinAPIAPI) Serve(builder middleware.Builder) http.Handler
- func (o *ZipkinAPIAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *ZipkinAPIAPI) SetDefaultConsumes(mediaType string)
- func (o *ZipkinAPIAPI) SetDefaultProduces(mediaType string)
- func (o *ZipkinAPIAPI) SetSpec(spec *loads.Document)
- func (o *ZipkinAPIAPI) UseRedoc()
- func (o *ZipkinAPIAPI) UseSwaggerUI()
- func (o *ZipkinAPIAPI) Validate() error
Constants ¶
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
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 ¶
func (fn PostSpansHandlerFunc) Handle(params PostSpansParams) middleware.Responder
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 ¶
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 ¶
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 ¶
DefaultConsumes returns the default consumes media type
func (*ZipkinAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*ZipkinAPI) HandlerFor ¶
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 ¶
ProducersFor gets the producers for the specified media types
func (*ZipkinAPI) RegisterFormat ¶
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 ¶
SetDefaultConsumes returns the default consumes media type
func (*ZipkinAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type
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