Documentation
¶
Overview ¶
Package httpsrv contains functions and data for a functional identity-api server.
Package httpsrv provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.5-0.20230118012357-f4cf8f9a5703 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type APIHandler
- type CreateIssuer200JSONResponse
- type CreateIssuerRequestObject
- type CreateIssuerResponseObject
- type CreateOAuthClient200JSONResponse
- type CreateOAuthClientRequestObject
- type CreateOAuthClientResponseObject
- type DeleteIssuer200JSONResponse
- type DeleteIssuerRequestObject
- type DeleteIssuerResponseObject
- type DeleteOAuthClient200JSONResponse
- type DeleteOAuthClientRequestObject
- type DeleteOAuthClientResponseObject
- type EchoRouter
- type GetIssuerByID200JSONResponse
- type GetIssuerByIDRequestObject
- type GetIssuerByIDResponseObject
- type GetOAuthClient200JSONResponse
- type GetOAuthClientRequestObject
- type GetOAuthClientResponseObject
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateIssuer(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) CreateOAuthClient(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteIssuer(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteOAuthClient(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetIssuerByID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetOAuthClient(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateIssuer(ctx echo.Context) error
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type UpdateIssuer200JSONResponse
- type UpdateIssuerRequestObject
- type UpdateIssuerResponseObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶ added in v0.1.3
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
APIHandler represents an identity-api management API handler.
func NewAPIHandler ¶
func NewAPIHandler(engine storage.Engine, amw *echoaudit.Middleware) (*APIHandler, error)
NewAPIHandler creates an API handler with the given storage engine.
func (*APIHandler) Routes ¶
func (h *APIHandler) Routes(rg *echo.Group)
Routes registers the API's routes against the provided router group.
type CreateIssuer200JSONResponse ¶
type CreateIssuer200JSONResponse Issuer
func (CreateIssuer200JSONResponse) VisitCreateIssuerResponse ¶
func (response CreateIssuer200JSONResponse) VisitCreateIssuerResponse(w http.ResponseWriter) error
type CreateIssuerRequestObject ¶
type CreateIssuerRequestObject struct {
OwnerID gidx.PrefixedID `json:"ownerID"`
Body *CreateIssuerJSONRequestBody
}
type CreateIssuerResponseObject ¶
type CreateIssuerResponseObject interface {
VisitCreateIssuerResponse(w http.ResponseWriter) error
}
type CreateOAuthClient200JSONResponse ¶ added in v0.0.8
type CreateOAuthClient200JSONResponse OAuthClient
func (CreateOAuthClient200JSONResponse) VisitCreateOAuthClientResponse ¶ added in v0.0.8
func (response CreateOAuthClient200JSONResponse) VisitCreateOAuthClientResponse(w http.ResponseWriter) error
type CreateOAuthClientRequestObject ¶ added in v0.0.8
type CreateOAuthClientRequestObject struct {
OwnerID gidx.PrefixedID `json:"ownerID"`
Body *CreateOAuthClientJSONRequestBody
}
type CreateOAuthClientResponseObject ¶ added in v0.0.8
type CreateOAuthClientResponseObject interface {
VisitCreateOAuthClientResponse(w http.ResponseWriter) error
}
type DeleteIssuer200JSONResponse ¶
type DeleteIssuer200JSONResponse DeleteResponse
func (DeleteIssuer200JSONResponse) VisitDeleteIssuerResponse ¶
func (response DeleteIssuer200JSONResponse) VisitDeleteIssuerResponse(w http.ResponseWriter) error
type DeleteIssuerRequestObject ¶
type DeleteIssuerRequestObject struct {
Id gidx.PrefixedID `json:"id"`
}
type DeleteIssuerResponseObject ¶
type DeleteIssuerResponseObject interface {
VisitDeleteIssuerResponse(w http.ResponseWriter) error
}
type DeleteOAuthClient200JSONResponse ¶ added in v0.0.8
type DeleteOAuthClient200JSONResponse DeleteResponse
func (DeleteOAuthClient200JSONResponse) VisitDeleteOAuthClientResponse ¶ added in v0.0.8
func (response DeleteOAuthClient200JSONResponse) VisitDeleteOAuthClientResponse(w http.ResponseWriter) error
type DeleteOAuthClientRequestObject ¶ added in v0.0.8
type DeleteOAuthClientRequestObject struct {
ClientID gidx.PrefixedID `json:"clientID"`
}
type DeleteOAuthClientResponseObject ¶ added in v0.0.8
type DeleteOAuthClientResponseObject interface {
VisitDeleteOAuthClientResponse(w http.ResponseWriter) error
}
type EchoRouter ¶ added in v0.1.3
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type GetIssuerByID200JSONResponse ¶
type GetIssuerByID200JSONResponse Issuer
func (GetIssuerByID200JSONResponse) VisitGetIssuerByIDResponse ¶
func (response GetIssuerByID200JSONResponse) VisitGetIssuerByIDResponse(w http.ResponseWriter) error
type GetIssuerByIDRequestObject ¶
type GetIssuerByIDRequestObject struct {
Id gidx.PrefixedID `json:"id"`
}
type GetIssuerByIDResponseObject ¶
type GetIssuerByIDResponseObject interface {
VisitGetIssuerByIDResponse(w http.ResponseWriter) error
}
type GetOAuthClient200JSONResponse ¶ added in v0.0.8
type GetOAuthClient200JSONResponse OAuthClient
func (GetOAuthClient200JSONResponse) VisitGetOAuthClientResponse ¶ added in v0.0.8
func (response GetOAuthClient200JSONResponse) VisitGetOAuthClientResponse(w http.ResponseWriter) error
type GetOAuthClientRequestObject ¶ added in v0.0.8
type GetOAuthClientRequestObject struct {
ClientID gidx.PrefixedID `json:"clientID"`
}
type GetOAuthClientResponseObject ¶ added in v0.0.8
type GetOAuthClientResponseObject interface {
VisitGetOAuthClientResponse(w http.ResponseWriter) error
}
type ServerInterface ¶
type ServerInterface interface {
// Deletes an OAuth Client
// (DELETE /api/v1/clients/{clientID})
DeleteOAuthClient(ctx echo.Context, clientID gidx.PrefixedID) error
// Gets information about an OAuth 2.0 Client.
// (GET /api/v1/clients/{clientID})
GetOAuthClient(ctx echo.Context, clientID gidx.PrefixedID) error
// Deletes an issuer with the given ID.
// (DELETE /api/v1/issuers/{id})
DeleteIssuer(ctx echo.Context, id gidx.PrefixedID) error
// Gets an issuer by ID.
// (GET /api/v1/issuers/{id})
GetIssuerByID(ctx echo.Context, id gidx.PrefixedID) error
// Updates an issuer.
// (PATCH /api/v1/issuers/{id})
UpdateIssuer(ctx echo.Context, id gidx.PrefixedID) error
// Creates an OAuth client.
// (POST /api/v1/owners/{ownerID}/clients)
CreateOAuthClient(ctx echo.Context, ownerID gidx.PrefixedID) error
// Creates an issuer.
// (POST /api/v1/owners/{ownerID}/issuers)
CreateIssuer(ctx echo.Context, ownerID gidx.PrefixedID) error
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateIssuer ¶
func (w *ServerInterfaceWrapper) CreateIssuer(ctx echo.Context) error
CreateIssuer converts echo context to params.
func (*ServerInterfaceWrapper) CreateOAuthClient ¶ added in v0.0.8
func (w *ServerInterfaceWrapper) CreateOAuthClient(ctx echo.Context) error
CreateOAuthClient converts echo context to params.
func (*ServerInterfaceWrapper) DeleteIssuer ¶
func (w *ServerInterfaceWrapper) DeleteIssuer(ctx echo.Context) error
DeleteIssuer converts echo context to params.
func (*ServerInterfaceWrapper) DeleteOAuthClient ¶ added in v0.0.8
func (w *ServerInterfaceWrapper) DeleteOAuthClient(ctx echo.Context) error
DeleteOAuthClient converts echo context to params.
func (*ServerInterfaceWrapper) GetIssuerByID ¶
func (w *ServerInterfaceWrapper) GetIssuerByID(ctx echo.Context) error
GetIssuerByID converts echo context to params.
func (*ServerInterfaceWrapper) GetOAuthClient ¶ added in v0.0.8
func (w *ServerInterfaceWrapper) GetOAuthClient(ctx echo.Context) error
GetOAuthClient converts echo context to params.
func (*ServerInterfaceWrapper) UpdateIssuer ¶
func (w *ServerInterfaceWrapper) UpdateIssuer(ctx echo.Context) error
UpdateIssuer converts echo context to params.
type StrictHandlerFunc ¶
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Deletes an OAuth Client
// (DELETE /api/v1/clients/{clientID})
DeleteOAuthClient(ctx context.Context, request DeleteOAuthClientRequestObject) (DeleteOAuthClientResponseObject, error)
// Gets information about an OAuth 2.0 Client.
// (GET /api/v1/clients/{clientID})
GetOAuthClient(ctx context.Context, request GetOAuthClientRequestObject) (GetOAuthClientResponseObject, error)
// Deletes an issuer with the given ID.
// (DELETE /api/v1/issuers/{id})
DeleteIssuer(ctx context.Context, request DeleteIssuerRequestObject) (DeleteIssuerResponseObject, error)
// Gets an issuer by ID.
// (GET /api/v1/issuers/{id})
GetIssuerByID(ctx context.Context, request GetIssuerByIDRequestObject) (GetIssuerByIDResponseObject, error)
// Updates an issuer.
// (PATCH /api/v1/issuers/{id})
UpdateIssuer(ctx context.Context, request UpdateIssuerRequestObject) (UpdateIssuerResponseObject, error)
// Creates an OAuth client.
// (POST /api/v1/owners/{ownerID}/clients)
CreateOAuthClient(ctx context.Context, request CreateOAuthClientRequestObject) (CreateOAuthClientResponseObject, error)
// Creates an issuer.
// (POST /api/v1/owners/{ownerID}/issuers)
CreateIssuer(ctx context.Context, request CreateIssuerRequestObject) (CreateIssuerResponseObject, error)
}
StrictServerInterface represents all server handlers.
type UpdateIssuer200JSONResponse ¶
type UpdateIssuer200JSONResponse Issuer
func (UpdateIssuer200JSONResponse) VisitUpdateIssuerResponse ¶
func (response UpdateIssuer200JSONResponse) VisitUpdateIssuerResponse(w http.ResponseWriter) error
type UpdateIssuerRequestObject ¶
type UpdateIssuerRequestObject struct {
Id gidx.PrefixedID `json:"id"`
Body *UpdateIssuerJSONRequestBody
}
type UpdateIssuerResponseObject ¶
type UpdateIssuerResponseObject interface {
VisitUpdateIssuerResponse(w http.ResponseWriter) error
}