Documentation
¶
Overview ¶
Package web provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type EchoRouter
- type EmployeeIDForm
- type EmployeeIDFormChoice
- type HandleEmployeeIDFormFormdataRequestBody
- type Handler
- type PageData
- type ServerInterface
- type ServerInterfaceWrapper
- type SessionID
- type Templates
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 ¶
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 EchoRouter ¶
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 EmployeeIDForm ¶
type EmployeeIDForm struct {
// Choice The choice of the user to either confirm or cancel the signing of the contract.
Choice EmployeeIDFormChoice `json:"choice"`
// Secret The secret for this signing session.
Secret string `json:"secret"`
}
EmployeeIDForm defines model for EmployeeIDForm.
type EmployeeIDFormChoice ¶
type EmployeeIDFormChoice string
EmployeeIDFormChoice The choice of the user to either confirm or cancel the signing of the contract.
const ( Cancel EmployeeIDFormChoice = "cancel" Confirm EmployeeIDFormChoice = "confirm" )
Defines values for EmployeeIDFormChoice.
type HandleEmployeeIDFormFormdataRequestBody ¶
type HandleEmployeeIDFormFormdataRequestBody = EmployeeIDForm
HandleEmployeeIDFormFormdataRequestBody defines body for HandleEmployeeIDForm for application/x-www-form-urlencoded ContentType.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(store types.SessionStore) *Handler
func (Handler) HandleEmployeeIDForm ¶
func (Handler) RenderEmployeeIDPage ¶
func (Handler) Routes ¶
func (h Handler) Routes(router core.EchoRouter)
Routes registers the Echo routes for the API.
type ServerInterface ¶
type ServerInterface interface {
// Render the employee ID page
// (GET /public/auth/v1/means/employeeid/{sessionID})
RenderEmployeeIDPage(ctx echo.Context, sessionID SessionID) error
// Handle the employee ID form.
// (POST /public/auth/v1/means/employeeid/{sessionID})
HandleEmployeeIDForm(ctx echo.Context, sessionID SessionID) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) HandleEmployeeIDForm ¶
func (w *ServerInterfaceWrapper) HandleEmployeeIDForm(ctx echo.Context) error
HandleEmployeeIDForm converts echo context to params.
func (*ServerInterfaceWrapper) RenderEmployeeIDPage ¶
func (w *ServerInterfaceWrapper) RenderEmployeeIDPage(ctx echo.Context) error
RenderEmployeeIDPage converts echo context to params.
type Templates ¶
type Templates struct {
// contains filtered or unexported fields
}
func NewTemplates ¶
func NewTemplates() *Templates