operations

package
Version: v0.0.0-...-719b496 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PostLoginOKCode int = 200

PostLoginOKCode is the HTTP code returned for type PostLoginOK

View Source
const PostSignOKCode int = 200

PostSignOKCode is the HTTP code returned for type PostSignOK

Variables

This section is empty.

Functions

This section is empty.

Types

type ChoriaCentralSigningServiceAPI

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

	// PostLoginHandler sets the operation handler for the post login operation
	PostLoginHandler PostLoginHandler
	// PostSignHandler sets the operation handler for the post sign operation
	PostSignHandler PostSignHandler

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

ChoriaCentralSigningServiceAPI Signing service for version 1 Choria Secure Requests

func NewChoriaCentralSigningServiceAPI

func NewChoriaCentralSigningServiceAPI(spec *loads.Document) *ChoriaCentralSigningServiceAPI

NewChoriaCentralSigningServiceAPI creates a new ChoriaCentralSigningService instance

func (*ChoriaCentralSigningServiceAPI) AddMiddlewareFor

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

AddMiddlewareFor adds a http middleware to existing handler

func (*ChoriaCentralSigningServiceAPI) AuthenticatorsFor

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*ChoriaCentralSigningServiceAPI) Authorizer

Authorizer returns the registered authorizer

func (*ChoriaCentralSigningServiceAPI) ConsumersFor

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

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

func (*ChoriaCentralSigningServiceAPI) Context

Context returns the middleware context for the choria central signing service API

func (*ChoriaCentralSigningServiceAPI) DefaultConsumes

func (o *ChoriaCentralSigningServiceAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*ChoriaCentralSigningServiceAPI) DefaultProduces

func (o *ChoriaCentralSigningServiceAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*ChoriaCentralSigningServiceAPI) Formats

Formats returns the registered string formats

func (*ChoriaCentralSigningServiceAPI) HandlerFor

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

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

func (*ChoriaCentralSigningServiceAPI) Init

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

func (*ChoriaCentralSigningServiceAPI) ProducersFor

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

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

func (*ChoriaCentralSigningServiceAPI) RegisterConsumer

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

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

func (*ChoriaCentralSigningServiceAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*ChoriaCentralSigningServiceAPI) RegisterProducer

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

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

func (*ChoriaCentralSigningServiceAPI) Serve

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

func (*ChoriaCentralSigningServiceAPI) ServeErrorFor

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

ServeErrorFor gets a error handler for a given operation id

func (*ChoriaCentralSigningServiceAPI) SetDefaultConsumes

func (o *ChoriaCentralSigningServiceAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*ChoriaCentralSigningServiceAPI) SetDefaultProduces

func (o *ChoriaCentralSigningServiceAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*ChoriaCentralSigningServiceAPI) SetSpec

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

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

func (*ChoriaCentralSigningServiceAPI) UseRedoc

func (o *ChoriaCentralSigningServiceAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*ChoriaCentralSigningServiceAPI) UseSwaggerUI

func (o *ChoriaCentralSigningServiceAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*ChoriaCentralSigningServiceAPI) Validate

func (o *ChoriaCentralSigningServiceAPI) Validate() error

Validate validates the registrations in the ChoriaCentralSigningServiceAPI

type PostLogin

type PostLogin struct {
	Context *middleware.Context
	Handler PostLoginHandler
}
PostLogin swagger:route POST /login postLogin

Logs into the service using auth0

Logs into the choria service

func NewPostLogin

func NewPostLogin(ctx *middleware.Context, handler PostLoginHandler) *PostLogin

NewPostLogin creates a new http.Handler for the post login operation

func (*PostLogin) ServeHTTP

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

type PostLoginHandler

type PostLoginHandler interface {
	Handle(PostLoginParams) middleware.Responder
}

PostLoginHandler interface for that can handle valid post login params

type PostLoginHandlerFunc

type PostLoginHandlerFunc func(PostLoginParams) middleware.Responder

PostLoginHandlerFunc turns a function with the right signature into a post login handler

func (PostLoginHandlerFunc) Handle

Handle executing the request and returning a response

type PostLoginOK

type PostLoginOK struct {

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

PostLoginOK Login response

swagger:response postLoginOK

func NewPostLoginOK

func NewPostLoginOK() *PostLoginOK

NewPostLoginOK creates PostLoginOK with default headers values

func (*PostLoginOK) SetPayload

func (o *PostLoginOK) SetPayload(payload *models.LoginResponse)

SetPayload sets the payload to the post login o k response

func (*PostLoginOK) WithPayload

func (o *PostLoginOK) WithPayload(payload *models.LoginResponse) *PostLoginOK

WithPayload adds the payload to the post login o k response

func (*PostLoginOK) WriteResponse

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

WriteResponse to the client

type PostLoginParams

type PostLoginParams struct {

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

	/*The Login request
	  Required: true
	  In: body
	*/
	Request *models.LoginRequest
}

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

swagger:parameters PostLogin

func NewPostLoginParams

func NewPostLoginParams() PostLoginParams

NewPostLoginParams creates a new PostLoginParams object

There are no default values defined in the spec.

func (*PostLoginParams) BindRequest

func (o *PostLoginParams) 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 NewPostLoginParams() beforehand.

type PostLoginURL

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

PostLoginURL generates an URL for the post login operation

func (*PostLoginURL) Build

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

Build a url path and query string

func (*PostLoginURL) BuildFull

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

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

func (*PostLoginURL) Must

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

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

func (*PostLoginURL) SetBasePath

func (o *PostLoginURL) 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 (*PostLoginURL) String

func (o *PostLoginURL) String() string

String returns the string representation of the path with query string

func (*PostLoginURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostLoginURL) WithBasePath

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

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 PostSign

type PostSign struct {
	Context *middleware.Context
	Handler PostSignHandler
}
PostSign swagger:route POST /sign postSign

Sign a message

Signs a Choria request

func NewPostSign

func NewPostSign(ctx *middleware.Context, handler PostSignHandler) *PostSign

NewPostSign creates a new http.Handler for the post sign operation

func (*PostSign) ServeHTTP

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

type PostSignHandler

type PostSignHandler interface {
	Handle(PostSignParams) middleware.Responder
}

PostSignHandler interface for that can handle valid post sign params

type PostSignHandlerFunc

type PostSignHandlerFunc func(PostSignParams) middleware.Responder

PostSignHandlerFunc turns a function with the right signature into a post sign handler

func (PostSignHandlerFunc) Handle

Handle executing the request and returning a response

type PostSignOK

type PostSignOK struct {

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

PostSignOK Signature response

swagger:response postSignOK

func NewPostSignOK

func NewPostSignOK() *PostSignOK

NewPostSignOK creates PostSignOK with default headers values

func (*PostSignOK) SetPayload

func (o *PostSignOK) SetPayload(payload *models.SignResponse)

SetPayload sets the payload to the post sign o k response

func (*PostSignOK) WithPayload

func (o *PostSignOK) WithPayload(payload *models.SignResponse) *PostSignOK

WithPayload adds the payload to the post sign o k response

func (*PostSignOK) WriteResponse

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

WriteResponse to the client

type PostSignParams

type PostSignParams struct {

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

	/*The Choria message to sign
	  Required: true
	  In: body
	*/
	Request *models.SignRequest
}

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

swagger:parameters PostSign

func NewPostSignParams

func NewPostSignParams() PostSignParams

NewPostSignParams creates a new PostSignParams object

There are no default values defined in the spec.

func (*PostSignParams) BindRequest

func (o *PostSignParams) 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 NewPostSignParams() beforehand.

type PostSignURL

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

PostSignURL generates an URL for the post sign operation

func (*PostSignURL) Build

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

Build a url path and query string

func (*PostSignURL) BuildFull

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

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

func (*PostSignURL) Must

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

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

func (*PostSignURL) SetBasePath

func (o *PostSignURL) 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 (*PostSignURL) String

func (o *PostSignURL) String() string

String returns the string representation of the path with query string

func (*PostSignURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostSignURL) WithBasePath

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

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

Jump to

Keyboard shortcuts

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