Documentation
¶
Index ¶
- Constants
- type FulcioServerAPI
- func (o *FulcioServerAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *FulcioServerAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *FulcioServerAPI) Authorizer() runtime.Authorizer
- func (o *FulcioServerAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *FulcioServerAPI) Context() *middleware.Context
- func (o *FulcioServerAPI) DefaultConsumes() string
- func (o *FulcioServerAPI) DefaultProduces() string
- func (o *FulcioServerAPI) Formats() strfmt.Registry
- func (o *FulcioServerAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *FulcioServerAPI) Init()
- func (o *FulcioServerAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *FulcioServerAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *FulcioServerAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *FulcioServerAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *FulcioServerAPI) Serve(builder middleware.Builder) http.Handler
- func (o *FulcioServerAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *FulcioServerAPI) SetDefaultConsumes(mediaType string)
- func (o *FulcioServerAPI) SetDefaultProduces(mediaType string)
- func (o *FulcioServerAPI) SetSpec(spec *loads.Document)
- func (o *FulcioServerAPI) UseRedoc()
- func (o *FulcioServerAPI) UseSwaggerUI()
- func (o *FulcioServerAPI) Validate() error
- type SigningCert
- type SigningCertBadRequest
- func (o *SigningCertBadRequest) SetContentType(contentType string)
- func (o *SigningCertBadRequest) SetPayload(payload *models.Error)
- func (o *SigningCertBadRequest) WithContentType(contentType string) *SigningCertBadRequest
- func (o *SigningCertBadRequest) WithPayload(payload *models.Error) *SigningCertBadRequest
- func (o *SigningCertBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type SigningCertCreated
- type SigningCertDefault
- func (o *SigningCertDefault) SetContentType(contentType string)
- func (o *SigningCertDefault) SetPayload(payload *models.Error)
- func (o *SigningCertDefault) SetStatusCode(code int)
- func (o *SigningCertDefault) WithContentType(contentType string) *SigningCertDefault
- func (o *SigningCertDefault) WithPayload(payload *models.Error) *SigningCertDefault
- func (o *SigningCertDefault) WithStatusCode(code int) *SigningCertDefault
- func (o *SigningCertDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type SigningCertHandler
- type SigningCertHandlerFunc
- type SigningCertParams
- type SigningCertURL
- func (o *SigningCertURL) Build() (*url.URL, error)
- func (o *SigningCertURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *SigningCertURL) Must(u *url.URL, err error) *url.URL
- func (o *SigningCertURL) SetBasePath(bp string)
- func (o *SigningCertURL) String() string
- func (o *SigningCertURL) StringFull(scheme, host string) string
- func (o *SigningCertURL) WithBasePath(bp string) *SigningCertURL
- type SigningCertUnauthorized
- func (o *SigningCertUnauthorized) SetContentType(contentType string)
- func (o *SigningCertUnauthorized) SetPayload(payload *models.Error)
- func (o *SigningCertUnauthorized) SetWWWAuthenticate(wWWAuthenticate string)
- func (o *SigningCertUnauthorized) WithContentType(contentType string) *SigningCertUnauthorized
- func (o *SigningCertUnauthorized) WithPayload(payload *models.Error) *SigningCertUnauthorized
- func (o *SigningCertUnauthorized) WithWWWAuthenticate(wWWAuthenticate string) *SigningCertUnauthorized
- func (o *SigningCertUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
Constants ¶
const SigningCertBadRequestCode int = 400
SigningCertBadRequestCode is the HTTP code returned for type SigningCertBadRequest
const SigningCertCreatedCode int = 201
SigningCertCreatedCode is the HTTP code returned for type SigningCertCreated
SigningCertUnauthorizedCode is the HTTP code returned for type SigningCertUnauthorized
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FulcioServerAPI ¶
type FulcioServerAPI 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
// ApplicationPemCertificateChainProducer registers a producer for the following mime types:
// - application/pem-certificate-chain
ApplicationPemCertificateChainProducer runtime.Producer
// BearerAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key Authorization provided in the header
BearerAuth func(string) (*oidc.IDToken, error)
// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
APIAuthorizer runtime.Authorizer
// SigningCertHandler sets the operation handler for the signing cert operation
SigningCertHandler SigningCertHandler
// 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
}
FulcioServerAPI the fulcio server API
func NewFulcioServerAPI ¶
func NewFulcioServerAPI(spec *loads.Document) *FulcioServerAPI
NewFulcioServerAPI creates a new FulcioServer instance
func (*FulcioServerAPI) AddMiddlewareFor ¶
func (o *FulcioServerAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
AddMiddlewareFor adds a http middleware to existing handler
func (*FulcioServerAPI) AuthenticatorsFor ¶
func (o *FulcioServerAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*FulcioServerAPI) Authorizer ¶
func (o *FulcioServerAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*FulcioServerAPI) ConsumersFor ¶
func (o *FulcioServerAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.
func (*FulcioServerAPI) Context ¶
func (o *FulcioServerAPI) Context() *middleware.Context
Context returns the middleware context for the fulcio server API
func (*FulcioServerAPI) DefaultConsumes ¶
func (o *FulcioServerAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*FulcioServerAPI) DefaultProduces ¶
func (o *FulcioServerAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*FulcioServerAPI) Formats ¶
func (o *FulcioServerAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*FulcioServerAPI) HandlerFor ¶
func (o *FulcioServerAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*FulcioServerAPI) Init ¶
func (o *FulcioServerAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*FulcioServerAPI) ProducersFor ¶
func (o *FulcioServerAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.
func (*FulcioServerAPI) RegisterConsumer ¶
func (o *FulcioServerAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*FulcioServerAPI) RegisterFormat ¶
func (o *FulcioServerAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*FulcioServerAPI) RegisterProducer ¶
func (o *FulcioServerAPI) RegisterProducer(mediaType string, producer runtime.Producer)
RegisterProducer allows you to add (or override) a producer for a media type.
func (*FulcioServerAPI) Serve ¶
func (o *FulcioServerAPI) 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 (*FulcioServerAPI) ServeErrorFor ¶
func (o *FulcioServerAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*FulcioServerAPI) SetDefaultConsumes ¶
func (o *FulcioServerAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*FulcioServerAPI) SetDefaultProduces ¶
func (o *FulcioServerAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*FulcioServerAPI) SetSpec ¶
func (o *FulcioServerAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*FulcioServerAPI) UseRedoc ¶
func (o *FulcioServerAPI) UseRedoc()
UseRedoc for documentation at /docs
func (*FulcioServerAPI) UseSwaggerUI ¶
func (o *FulcioServerAPI) UseSwaggerUI()
UseSwaggerUI for documentation at /docs
func (*FulcioServerAPI) Validate ¶
func (o *FulcioServerAPI) Validate() error
Validate validates the registrations in the FulcioServerAPI
type SigningCert ¶
type SigningCert struct {
Context *middleware.Context
Handler SigningCertHandler
}
SigningCert swagger:route POST /signingCert signingCert
create a cert, return content with a location header (with URL to CTL entry)
func NewSigningCert ¶
func NewSigningCert(ctx *middleware.Context, handler SigningCertHandler) *SigningCert
NewSigningCert creates a new http.Handler for the signing cert operation
func (*SigningCert) ServeHTTP ¶
func (o *SigningCert) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type SigningCertBadRequest ¶
type SigningCertBadRequest struct {
/*
*/
ContentType string `json:"Content-Type"`
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
SigningCertBadRequest The content supplied to the server was invalid
swagger:response signingCertBadRequest
func NewSigningCertBadRequest ¶
func NewSigningCertBadRequest() *SigningCertBadRequest
NewSigningCertBadRequest creates SigningCertBadRequest with default headers values
func (*SigningCertBadRequest) SetContentType ¶
func (o *SigningCertBadRequest) SetContentType(contentType string)
SetContentType sets the contentType to the signing cert bad request response
func (*SigningCertBadRequest) SetPayload ¶
func (o *SigningCertBadRequest) SetPayload(payload *models.Error)
SetPayload sets the payload to the signing cert bad request response
func (*SigningCertBadRequest) WithContentType ¶
func (o *SigningCertBadRequest) WithContentType(contentType string) *SigningCertBadRequest
WithContentType adds the contentType to the signing cert bad request response
func (*SigningCertBadRequest) WithPayload ¶
func (o *SigningCertBadRequest) WithPayload(payload *models.Error) *SigningCertBadRequest
WithPayload adds the payload to the signing cert bad request response
func (*SigningCertBadRequest) WriteResponse ¶
func (o *SigningCertBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type SigningCertCreated ¶
type SigningCertCreated struct {
/*
In: Body
*/
Payload string `json:"body,omitempty"`
}
SigningCertCreated Generated Certificate Chain
swagger:response signingCertCreated
func NewSigningCertCreated ¶
func NewSigningCertCreated() *SigningCertCreated
NewSigningCertCreated creates SigningCertCreated with default headers values
func (*SigningCertCreated) SetPayload ¶
func (o *SigningCertCreated) SetPayload(payload string)
SetPayload sets the payload to the signing cert created response
func (*SigningCertCreated) WithPayload ¶
func (o *SigningCertCreated) WithPayload(payload string) *SigningCertCreated
WithPayload adds the payload to the signing cert created response
func (*SigningCertCreated) WriteResponse ¶
func (o *SigningCertCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type SigningCertDefault ¶
type SigningCertDefault struct {
/*
*/
ContentType string `json:"Content-Type"`
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
// contains filtered or unexported fields
}
SigningCertDefault There was an internal error in the server while processing the request
swagger:response signingCertDefault
func NewSigningCertDefault ¶
func NewSigningCertDefault(code int) *SigningCertDefault
NewSigningCertDefault creates SigningCertDefault with default headers values
func (*SigningCertDefault) SetContentType ¶
func (o *SigningCertDefault) SetContentType(contentType string)
SetContentType sets the contentType to the signing cert default response
func (*SigningCertDefault) SetPayload ¶
func (o *SigningCertDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the signing cert default response
func (*SigningCertDefault) SetStatusCode ¶
func (o *SigningCertDefault) SetStatusCode(code int)
SetStatusCode sets the status to the signing cert default response
func (*SigningCertDefault) WithContentType ¶
func (o *SigningCertDefault) WithContentType(contentType string) *SigningCertDefault
WithContentType adds the contentType to the signing cert default response
func (*SigningCertDefault) WithPayload ¶
func (o *SigningCertDefault) WithPayload(payload *models.Error) *SigningCertDefault
WithPayload adds the payload to the signing cert default response
func (*SigningCertDefault) WithStatusCode ¶
func (o *SigningCertDefault) WithStatusCode(code int) *SigningCertDefault
WithStatusCode adds the status to the signing cert default response
func (*SigningCertDefault) WriteResponse ¶
func (o *SigningCertDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type SigningCertHandler ¶
type SigningCertHandler interface {
Handle(SigningCertParams, *oidc.IDToken) middleware.Responder
}
SigningCertHandler interface for that can handle valid signing cert params
type SigningCertHandlerFunc ¶
type SigningCertHandlerFunc func(SigningCertParams, *oidc.IDToken) middleware.Responder
SigningCertHandlerFunc turns a function with the right signature into a signing cert handler
func (SigningCertHandlerFunc) Handle ¶
func (fn SigningCertHandlerFunc) Handle(params SigningCertParams, principal *oidc.IDToken) middleware.Responder
Handle executing the request and returning a response
type SigningCertParams ¶
type SigningCertParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*Request for signing certificate
Required: true
In: body
*/
CertificateRequest *models.CertificateRequest
}
SigningCertParams contains all the bound params for the signing cert operation typically these are obtained from a http.Request
swagger:parameters signingCert
func NewSigningCertParams ¶
func NewSigningCertParams() SigningCertParams
NewSigningCertParams creates a new SigningCertParams object
There are no default values defined in the spec.
func (*SigningCertParams) BindRequest ¶
func (o *SigningCertParams) 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 NewSigningCertParams() beforehand.
type SigningCertURL ¶
type SigningCertURL struct {
// contains filtered or unexported fields
}
SigningCertURL generates an URL for the signing cert operation
func (*SigningCertURL) Build ¶
func (o *SigningCertURL) Build() (*url.URL, error)
Build a url path and query string
func (*SigningCertURL) BuildFull ¶
func (o *SigningCertURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*SigningCertURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*SigningCertURL) SetBasePath ¶
func (o *SigningCertURL) 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 (*SigningCertURL) String ¶
func (o *SigningCertURL) String() string
String returns the string representation of the path with query string
func (*SigningCertURL) StringFull ¶
func (o *SigningCertURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*SigningCertURL) WithBasePath ¶
func (o *SigningCertURL) WithBasePath(bp string) *SigningCertURL
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 SigningCertUnauthorized ¶
type SigningCertUnauthorized struct {
ContentType string `json:"Content-Type"`
WWWAuthenticate string `json:"WWW-Authenticate"`
Payload *models.Error `json:"body,omitempty"`
}
SigningCertUnauthorized The request could not be authorized
swagger:response signingCertUnauthorized
func NewSigningCertUnauthorized ¶
func NewSigningCertUnauthorized() *SigningCertUnauthorized
NewSigningCertUnauthorized creates SigningCertUnauthorized with default headers values
func (*SigningCertUnauthorized) SetContentType ¶
func (o *SigningCertUnauthorized) SetContentType(contentType string)
SetContentType sets the contentType to the signing cert unauthorized response
func (*SigningCertUnauthorized) SetPayload ¶
func (o *SigningCertUnauthorized) SetPayload(payload *models.Error)
SetPayload sets the payload to the signing cert unauthorized response
func (*SigningCertUnauthorized) SetWWWAuthenticate ¶
func (o *SigningCertUnauthorized) SetWWWAuthenticate(wWWAuthenticate string)
SetWWWAuthenticate sets the wWWAuthenticate to the signing cert unauthorized response
func (*SigningCertUnauthorized) WithContentType ¶
func (o *SigningCertUnauthorized) WithContentType(contentType string) *SigningCertUnauthorized
WithContentType adds the contentType to the signing cert unauthorized response
func (*SigningCertUnauthorized) WithPayload ¶
func (o *SigningCertUnauthorized) WithPayload(payload *models.Error) *SigningCertUnauthorized
WithPayload adds the payload to the signing cert unauthorized response
func (*SigningCertUnauthorized) WithWWWAuthenticate ¶
func (o *SigningCertUnauthorized) WithWWWAuthenticate(wWWAuthenticate string) *SigningCertUnauthorized
WithWWWAuthenticate adds the wWWAuthenticate to the signing cert unauthorized response
func (*SigningCertUnauthorized) WriteResponse ¶
func (o *SigningCertUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client