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 gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type APIHandler
- type CreateIssuer200JSONResponse
- type CreateIssuerRequestObject
- type CreateIssuerResponseObject
- type DeleteIssuer200JSONResponse
- type DeleteIssuerRequestObject
- type DeleteIssuerResponseObject
- type GetIssuerByID200JSONResponse
- type GetIssuerByIDRequestObject
- type GetIssuerByIDResponseObject
- type GinServerOptions
- type MiddlewareFunc
- type ServerInterface
- type ServerInterfaceWrapper
- 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 gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
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) (*APIHandler, error)
NewAPIHandler creates an API handler with the given storage engine.
func (*APIHandler) Routes ¶
func (h *APIHandler) Routes(rg *gin.RouterGroup)
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 {
TenantID openapi_types.UUID `json:"tenantID"`
Body *CreateIssuerJSONRequestBody
}
type CreateIssuerResponseObject ¶
type CreateIssuerResponseObject interface {
VisitCreateIssuerResponse(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 openapi_types.UUID `json:"id"`
}
type DeleteIssuerResponseObject ¶
type DeleteIssuerResponseObject interface {
VisitDeleteIssuerResponse(w http.ResponseWriter) error
}
type GetIssuerByID200JSONResponse ¶
type GetIssuerByID200JSONResponse Issuer
func (GetIssuerByID200JSONResponse) VisitGetIssuerByIDResponse ¶
func (response GetIssuerByID200JSONResponse) VisitGetIssuerByIDResponse(w http.ResponseWriter) error
type GetIssuerByIDRequestObject ¶
type GetIssuerByIDRequestObject struct {
Id openapi_types.UUID `json:"id"`
}
type GetIssuerByIDResponseObject ¶
type GetIssuerByIDResponseObject interface {
VisitGetIssuerByIDResponse(w http.ResponseWriter) error
}
type GinServerOptions ¶
type GinServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶
type ServerInterface ¶
type ServerInterface interface {
// Deletes an issuer with the given ID.
// (DELETE /api/v1/issuers/{id})
DeleteIssuer(c *gin.Context, id openapi_types.UUID)
// Gets an issuer by ID.
// (GET /api/v1/issuers/{id})
GetIssuerByID(c *gin.Context, id openapi_types.UUID)
// Updates an issuer.
// (PATCH /api/v1/issuers/{id})
UpdateIssuer(c *gin.Context, id openapi_types.UUID)
// Creates an issuer.
// (POST /api/v1/tenants/{tenantID}/issuers)
CreateIssuer(c *gin.Context, tenantID openapi_types.UUID)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateIssuer ¶
func (siw *ServerInterfaceWrapper) CreateIssuer(c *gin.Context)
CreateIssuer operation middleware
func (*ServerInterfaceWrapper) DeleteIssuer ¶
func (siw *ServerInterfaceWrapper) DeleteIssuer(c *gin.Context)
DeleteIssuer operation middleware
func (*ServerInterfaceWrapper) GetIssuerByID ¶
func (siw *ServerInterfaceWrapper) GetIssuerByID(c *gin.Context)
GetIssuerByID operation middleware
func (*ServerInterfaceWrapper) UpdateIssuer ¶
func (siw *ServerInterfaceWrapper) UpdateIssuer(c *gin.Context)
UpdateIssuer operation middleware
type StrictHandlerFunc ¶
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// 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 issuer.
// (POST /api/v1/tenants/{tenantID}/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 openapi_types.UUID `json:"id"`
Body *UpdateIssuerJSONRequestBody
}
type UpdateIssuerResponseObject ¶
type UpdateIssuerResponseObject interface {
VisitUpdateIssuerResponse(w http.ResponseWriter) error
}