gen

package
v0.0.0-...-7379bb1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gen provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Package gen provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Package gen provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (*openapi3.Swagger, error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

Types

type APIKey

type APIKey struct {

	// The API Key
	Id string `json:"id"`

	// The role associated with the API key
	Role string `json:"role"`

	// The user associated with the API key
	User string `json:"user"`
}

APIKey defines model for APIKey.

type APIKeys

type APIKeys []struct {

	// The API Key
	Id string `json:"id"`

	// The role associated with the API key
	Role string `json:"role"`

	// The user associated with the API key
	User string `json:"user"`
}

APIKeys defines model for APIKeys.

type AdminSetKeyJSONBody

type AdminSetKeyJSONBody APIKey

AdminSetKeyJSONBody defines parameters for AdminSetKey.

type AdminSetKeyJSONRequestBody

type AdminSetKeyJSONRequestBody AdminSetKeyJSONBody

AdminSetKeyRequestBody defines body for AdminSetKey for application/json ContentType.

type BadRequest

type BadRequest Error

BadRequest defines model for BadRequest.

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 Error

type Error struct {

	// Error message
	Error string `json:"error"`
}

Error defines model for Error.

type GetTokenParams

type GetTokenParams struct {
	Role *string `json:"role,omitempty"`
}

GetTokenParams defines parameters for GetToken.

type LogLevel

type LogLevel struct {

	// Loging level
	Level string `json:"level"`
}

LogLevel defines model for LogLevel.

type ServerInterface

type ServerInterface interface {
	// List of all keys
	// (GET /admin/keys)
	AdminGetKeys(ctx echo.Context) error
	// Set API key info
	// (PUT /admin/keys)
	AdminSetKey(ctx echo.Context) error
	// Delete API key
	// (DELETE /admin/keys/{apiKeyID})
	AdminDeleteKey(ctx echo.Context, apiKeyID string) error
	// Display API key info
	// (GET /admin/keys/{apiKeyID})
	AdminGetKey(ctx echo.Context, apiKeyID string) error
	// Get logging level
	// (GET /log/level)
	GetLogLevel(ctx echo.Context) error
	// Set logging level
	// (PUT /log/level)
	SetLogLevel(ctx echo.Context) error
	// Get time zone
	// (GET /timezone)
	GetTimeZone(ctx echo.Context) error
	// Set time zone
	// (PUT /timezone)
	SetTimeZone(ctx echo.Context) error
	// Get a JWT token
	// (GET /token)
	GetToken(ctx echo.Context, params GetTokenParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) AdminDeleteKey

func (w *ServerInterfaceWrapper) AdminDeleteKey(ctx echo.Context) error

AdminDeleteKey converts echo context to params.

func (*ServerInterfaceWrapper) AdminGetKey

func (w *ServerInterfaceWrapper) AdminGetKey(ctx echo.Context) error

AdminGetKey converts echo context to params.

func (*ServerInterfaceWrapper) AdminGetKeys

func (w *ServerInterfaceWrapper) AdminGetKeys(ctx echo.Context) error

AdminGetKeys converts echo context to params.

func (*ServerInterfaceWrapper) AdminSetKey

func (w *ServerInterfaceWrapper) AdminSetKey(ctx echo.Context) error

AdminSetKey converts echo context to params.

func (*ServerInterfaceWrapper) GetLogLevel

func (w *ServerInterfaceWrapper) GetLogLevel(ctx echo.Context) error

GetLogLevel converts echo context to params.

func (*ServerInterfaceWrapper) GetTimeZone

func (w *ServerInterfaceWrapper) GetTimeZone(ctx echo.Context) error

GetTimeZone converts echo context to params.

func (*ServerInterfaceWrapper) GetToken

func (w *ServerInterfaceWrapper) GetToken(ctx echo.Context) error

GetToken converts echo context to params.

func (*ServerInterfaceWrapper) SetLogLevel

func (w *ServerInterfaceWrapper) SetLogLevel(ctx echo.Context) error

SetLogLevel converts echo context to params.

func (*ServerInterfaceWrapper) SetTimeZone

func (w *ServerInterfaceWrapper) SetTimeZone(ctx echo.Context) error

SetTimeZone converts echo context to params.

type SetLogLevelJSONBody

type SetLogLevelJSONBody LogLevel

SetLogLevelJSONBody defines parameters for SetLogLevel.

type SetLogLevelJSONRequestBody

type SetLogLevelJSONRequestBody SetLogLevelJSONBody

SetLogLevelRequestBody defines body for SetLogLevel for application/json ContentType.

type SetTimeZoneJSONBody

type SetTimeZoneJSONBody TimeZone

SetTimeZoneJSONBody defines parameters for SetTimeZone.

type SetTimeZoneJSONRequestBody

type SetTimeZoneJSONRequestBody SetTimeZoneJSONBody

SetTimeZoneRequestBody defines body for SetTimeZone for application/json ContentType.

type Success

type Success struct {

	// Success message
	Message string `json:"message"`
}

Success defines model for Success.

type TimeZone

type TimeZone struct {

	// Time zone
	Timezone string `json:"timezone"`
}

TimeZone defines model for TimeZone.

type Token

type Token struct {

	// The expiration time of the token
	ExpiresAt int `json:"expires_at"`

	// The role associated with the token
	Role string `json:"role"`

	// The authentication token
	Token string `json:"token"`
}

Token defines model for Token.

type UnauthorizedError

type UnauthorizedError Error

UnauthorizedError defines model for UnauthorizedError.

Jump to

Keyboard shortcuts

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