Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Package gen contains generated code for the audit API.
Index ¶
- Constants
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type AuditEntry
- type AuditEntryResponse
- type EchoRouter
- type ErrorResponse
- type GetAuditExport200JSONResponse
- type GetAuditExport401JSONResponse
- type GetAuditExport403JSONResponse
- type GetAuditExport500JSONResponse
- type GetAuditExportRequestObject
- type GetAuditExportResponseObject
- type GetAuditLogByID200JSONResponse
- type GetAuditLogByID401JSONResponse
- type GetAuditLogByID403JSONResponse
- type GetAuditLogByID404JSONResponse
- type GetAuditLogByID500JSONResponse
- type GetAuditLogByIDRequestObject
- type GetAuditLogByIDResponseObject
- type GetAuditLogs200JSONResponse
- type GetAuditLogs400JSONResponse
- type GetAuditLogs401JSONResponse
- type GetAuditLogs403JSONResponse
- type GetAuditLogs500JSONResponse
- type GetAuditLogsParams
- type GetAuditLogsRequestObject
- type GetAuditLogsResponseObject
- type ListAuditResponse
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
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 AuditEntry ¶
type AuditEntry struct {
// DurationMs Request duration in milliseconds.
DurationMs int64 `json:"duration_ms"`
// Id Unique identifier for the audit entry.
Id openapi_types.UUID `json:"id"`
// Method HTTP method.
Method string `json:"method"`
// OperationId OpenAPI operation ID.
OperationId *string `json:"operation_id,omitempty"`
// Path Request URL path.
Path string `json:"path"`
// ResponseCode HTTP response status code.
ResponseCode int `json:"response_code"`
// Roles Roles from the JWT token.
Roles []string `json:"roles"`
// SourceIp Client IP address.
SourceIp string `json:"source_ip"`
// Timestamp When the request was processed.
Timestamp time.Time `json:"timestamp"`
// User Authenticated user (JWT subject).
User string `json:"user"`
}
AuditEntry defines model for AuditEntry.
type AuditEntryResponse ¶
type AuditEntryResponse struct {
Entry AuditEntry `json:"entry"`
}
AuditEntryResponse defines model for AuditEntryResponse.
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 ErrorResponse ¶
type ErrorResponse = externalRef0.ErrorResponse
ErrorResponse defines model for ErrorResponse.
type GetAuditExport200JSONResponse ¶
type GetAuditExport200JSONResponse ListAuditResponse
func (GetAuditExport200JSONResponse) VisitGetAuditExportResponse ¶
func (response GetAuditExport200JSONResponse) VisitGetAuditExportResponse(w http.ResponseWriter) error
type GetAuditExport401JSONResponse ¶
type GetAuditExport401JSONResponse externalRef0.ErrorResponse
func (GetAuditExport401JSONResponse) VisitGetAuditExportResponse ¶
func (response GetAuditExport401JSONResponse) VisitGetAuditExportResponse(w http.ResponseWriter) error
type GetAuditExport403JSONResponse ¶
type GetAuditExport403JSONResponse externalRef0.ErrorResponse
func (GetAuditExport403JSONResponse) VisitGetAuditExportResponse ¶
func (response GetAuditExport403JSONResponse) VisitGetAuditExportResponse(w http.ResponseWriter) error
type GetAuditExport500JSONResponse ¶
type GetAuditExport500JSONResponse externalRef0.ErrorResponse
func (GetAuditExport500JSONResponse) VisitGetAuditExportResponse ¶
func (response GetAuditExport500JSONResponse) VisitGetAuditExportResponse(w http.ResponseWriter) error
type GetAuditExportRequestObject ¶
type GetAuditExportRequestObject struct {
}
type GetAuditExportResponseObject ¶
type GetAuditExportResponseObject interface {
VisitGetAuditExportResponse(w http.ResponseWriter) error
}
type GetAuditLogByID200JSONResponse ¶
type GetAuditLogByID200JSONResponse AuditEntryResponse
func (GetAuditLogByID200JSONResponse) VisitGetAuditLogByIDResponse ¶
func (response GetAuditLogByID200JSONResponse) VisitGetAuditLogByIDResponse(w http.ResponseWriter) error
type GetAuditLogByID401JSONResponse ¶
type GetAuditLogByID401JSONResponse externalRef0.ErrorResponse
func (GetAuditLogByID401JSONResponse) VisitGetAuditLogByIDResponse ¶
func (response GetAuditLogByID401JSONResponse) VisitGetAuditLogByIDResponse(w http.ResponseWriter) error
type GetAuditLogByID403JSONResponse ¶
type GetAuditLogByID403JSONResponse externalRef0.ErrorResponse
func (GetAuditLogByID403JSONResponse) VisitGetAuditLogByIDResponse ¶
func (response GetAuditLogByID403JSONResponse) VisitGetAuditLogByIDResponse(w http.ResponseWriter) error
type GetAuditLogByID404JSONResponse ¶
type GetAuditLogByID404JSONResponse externalRef0.ErrorResponse
func (GetAuditLogByID404JSONResponse) VisitGetAuditLogByIDResponse ¶
func (response GetAuditLogByID404JSONResponse) VisitGetAuditLogByIDResponse(w http.ResponseWriter) error
type GetAuditLogByID500JSONResponse ¶
type GetAuditLogByID500JSONResponse externalRef0.ErrorResponse
func (GetAuditLogByID500JSONResponse) VisitGetAuditLogByIDResponse ¶
func (response GetAuditLogByID500JSONResponse) VisitGetAuditLogByIDResponse(w http.ResponseWriter) error
type GetAuditLogByIDRequestObject ¶
type GetAuditLogByIDRequestObject struct {
Id openapi_types.UUID `json:"id"`
}
type GetAuditLogByIDResponseObject ¶
type GetAuditLogByIDResponseObject interface {
VisitGetAuditLogByIDResponse(w http.ResponseWriter) error
}
type GetAuditLogs200JSONResponse ¶
type GetAuditLogs200JSONResponse ListAuditResponse
func (GetAuditLogs200JSONResponse) VisitGetAuditLogsResponse ¶
func (response GetAuditLogs200JSONResponse) VisitGetAuditLogsResponse(w http.ResponseWriter) error
type GetAuditLogs400JSONResponse ¶
type GetAuditLogs400JSONResponse externalRef0.ErrorResponse
func (GetAuditLogs400JSONResponse) VisitGetAuditLogsResponse ¶
func (response GetAuditLogs400JSONResponse) VisitGetAuditLogsResponse(w http.ResponseWriter) error
type GetAuditLogs401JSONResponse ¶
type GetAuditLogs401JSONResponse externalRef0.ErrorResponse
func (GetAuditLogs401JSONResponse) VisitGetAuditLogsResponse ¶
func (response GetAuditLogs401JSONResponse) VisitGetAuditLogsResponse(w http.ResponseWriter) error
type GetAuditLogs403JSONResponse ¶
type GetAuditLogs403JSONResponse externalRef0.ErrorResponse
func (GetAuditLogs403JSONResponse) VisitGetAuditLogsResponse ¶
func (response GetAuditLogs403JSONResponse) VisitGetAuditLogsResponse(w http.ResponseWriter) error
type GetAuditLogs500JSONResponse ¶
type GetAuditLogs500JSONResponse externalRef0.ErrorResponse
func (GetAuditLogs500JSONResponse) VisitGetAuditLogsResponse ¶
func (response GetAuditLogs500JSONResponse) VisitGetAuditLogsResponse(w http.ResponseWriter) error
type GetAuditLogsParams ¶
type GetAuditLogsParams struct {
// Limit Maximum number of entries to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty" validate:"omitempty,min=1,max=100"`
// Offset Number of entries to skip.
Offset *int `form:"offset,omitempty" json:"offset,omitempty" validate:"omitempty,min=0"`
}
GetAuditLogsParams defines parameters for GetAuditLogs.
type GetAuditLogsRequestObject ¶
type GetAuditLogsRequestObject struct {
Params GetAuditLogsParams
}
type GetAuditLogsResponseObject ¶
type GetAuditLogsResponseObject interface {
VisitGetAuditLogsResponse(w http.ResponseWriter) error
}
type ListAuditResponse ¶
type ListAuditResponse struct {
// Items The audit entries for this page.
Items []AuditEntry `json:"items"`
// TotalItems Total number of audit entries.
TotalItems int `json:"total_items"`
}
ListAuditResponse defines model for ListAuditResponse.
type ServerInterface ¶
type ServerInterface interface {
// List audit log entries
// (GET /audit)
GetAuditLogs(ctx echo.Context, params GetAuditLogsParams) error
// Export all audit log entries
// (GET /audit/export)
GetAuditExport(ctx echo.Context) error
// Get a single audit log entry
// (GET /audit/{id})
GetAuditLogByID(ctx echo.Context, id openapi_types.UUID) 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) GetAuditExport ¶
func (w *ServerInterfaceWrapper) GetAuditExport(ctx echo.Context) error
GetAuditExport converts echo context to params.
func (*ServerInterfaceWrapper) GetAuditLogByID ¶
func (w *ServerInterfaceWrapper) GetAuditLogByID(ctx echo.Context) error
GetAuditLogByID converts echo context to params.
func (*ServerInterfaceWrapper) GetAuditLogs ¶
func (w *ServerInterfaceWrapper) GetAuditLogs(ctx echo.Context) error
GetAuditLogs converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List audit log entries
// (GET /audit)
GetAuditLogs(ctx context.Context, request GetAuditLogsRequestObject) (GetAuditLogsResponseObject, error)
// Export all audit log entries
// (GET /audit/export)
GetAuditExport(ctx context.Context, request GetAuditExportRequestObject) (GetAuditExportResponseObject, error)
// Get a single audit log entry
// (GET /audit/{id})
GetAuditLogByID(ctx context.Context, request GetAuditLogByIDRequestObject) (GetAuditLogByIDResponseObject, error)
}
StrictServerInterface represents all server handlers.