httpsrv

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

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

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 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 {
	TenantID openapi_types.UUID `json:"tenantID"`
	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 openapi_types.UUID `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 openapi_types.UUID `json:"clientID"`
}

type DeleteOAuthClientResponseObject added in v0.0.8

type DeleteOAuthClientResponseObject interface {
	VisitDeleteOAuthClientResponse(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 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 openapi_types.UUID `json:"clientID"`
}

type GetOAuthClientResponseObject added in v0.0.8

type GetOAuthClientResponseObject interface {
	VisitGetOAuthClientResponse(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 MiddlewareFunc func(c *gin.Context)

type ServerInterface

type ServerInterface interface {
	// Deletes an OAuth Client
	// (DELETE /api/v1/clients/{clientID})
	DeleteOAuthClient(c *gin.Context, clientID openapi_types.UUID)
	// Gets information about an OAuth 2.0 Client.
	// (GET /api/v1/clients/{clientID})
	GetOAuthClient(c *gin.Context, clientID openapi_types.UUID)
	// 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 OAuth client.
	// (POST /api/v1/tenants/{tenantID}/clients)
	CreateOAuthClient(c *gin.Context, tenantID 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) CreateOAuthClient added in v0.0.8

func (siw *ServerInterfaceWrapper) CreateOAuthClient(c *gin.Context)

CreateOAuthClient operation middleware

func (*ServerInterfaceWrapper) DeleteIssuer

func (siw *ServerInterfaceWrapper) DeleteIssuer(c *gin.Context)

DeleteIssuer operation middleware

func (*ServerInterfaceWrapper) DeleteOAuthClient added in v0.0.8

func (siw *ServerInterfaceWrapper) DeleteOAuthClient(c *gin.Context)

DeleteOAuthClient operation middleware

func (*ServerInterfaceWrapper) GetIssuerByID

func (siw *ServerInterfaceWrapper) GetIssuerByID(c *gin.Context)

GetIssuerByID operation middleware

func (*ServerInterfaceWrapper) GetOAuthClient added in v0.0.8

func (siw *ServerInterfaceWrapper) GetOAuthClient(c *gin.Context)

GetOAuthClient operation middleware

func (*ServerInterfaceWrapper) UpdateIssuer

func (siw *ServerInterfaceWrapper) UpdateIssuer(c *gin.Context)

UpdateIssuer operation middleware

type StrictHandlerFunc

type StrictHandlerFunc func(ctx *gin.Context, args interface{}) (interface{}, error)

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/tenants/{tenantID}/clients)
	CreateOAuthClient(ctx context.Context, request CreateOAuthClientRequestObject) (CreateOAuthClientResponseObject, 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
}

Jump to

Keyboard shortcuts

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