models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package models is intended to expose all types or interfaces that may be needed to interract with various emf subpackages, but exclusively in situations where functionality from inside these packages is not needed. For example, the endpoint package in each EMF service can register routes to a router.Group but should not otherwise control routing.

Index

Constants

View Source
const MethodPostGob = context.MethodPostGob

MethodPostGob is the HTTP Method string to enable Gob encoding for a POST request

View Source
const MethodPutGob = context.MethodPutGob

MethodPutGob is the HTTP Method string to enable Gob encoding for a POST request

View Source
const UUIDRegex = middleware.UUIDRegex

UUIDRegex is a regular expression that matches UUIDv4

Variables

View Source
var ErrorFromComponent = errors.ErrorFromComponent

ErrorFromComponent is a generic error for use with errors.As to check the error's component name

Example: if errors.Is(err, emf.ErrorFromComponent("kmc")) {
View Source
var ErrorResponseCode = errors.ErrorResponseCode

ErrorResponseCode is a generic error for use with errors.Is to check against the StatusCode

Example: if errors.Is(err, emf.ErrorResponseCode(401)) {
View Source
var ErrorType = errors.ErrorType

ErrorType is a generic error for use with error.Is comparisons:

Example: errors.Is(err, emf.ErrorType("sp.400.RequestPayloadInvalid"))
View Source
var WrapRequest = middleware.WrapRequest

WrapRequest is the constructor for a RequestWrapperMiddleware

View Source
var WrapResponse = middleware.WrapResponse

WrapResponse is the constructor for a ResponseWrapperMiddleware

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig = configurer.BuildConfig

BuildConfig provides the logger and the info endpoint access to hard-coded build configuration

type ConfigReader

type ConfigReader = configurer.ConfigReader

ConfigReader defines the interface for read-only config file access

type Context

type Context = context.EMFContext

Context is the EMF Context method set

type ContextType

type ContextType = context.EMFContextType

ContextType is the EMF Context Type

type DataPoint

type DataPoint = configurer.DataPoint

DataPoint represents a data point value

type EMFError

type EMFError = errors.EMFError

EMFError is the Error Interface created by a EMFErrorHandler

type EMFErrorHandler

type EMFErrorHandler = errors.EMFErrorHandler

EMFErrorHandler is the Error Handler Interface exposed by the EMFContext

type EMFErrorType

type EMFErrorType = errors.EMFErrorType

EMFErrorType is the Error Type created by a EMFErrorHandler

type HTTPClient

type HTTPClient = router.HTTPClient

HTTPClient issues HTTP Requests and performs error handling.

type HandlerFunc

type HandlerFunc = router.HandlerFunc

HandlerFunc is equivalent to the echo HandlerFunc interface to avoid the middleware package having to import it

type Logger

type Logger = echo.Logger

Logger is the type of the echo Logger

type Middleware

type Middleware = router.Middleware

Middleware is the type of our modified echo Middleware

type RequestHandler

type RequestHandler = context.RequestHandler

RequestHandler is the subset of a Context used for HTTP Requests

type RequestHandlerType

type RequestHandlerType = context.RequestHandlerType

RequestHandlerType is the subset of a Context used for HTTP Requests

type Router

type Router = router.Router

Router is the type of the echo Router

type RouterGroup

type RouterGroup = router.Group

RouterGroup is the type of the echo Router Group

type SimpleErrorType

type SimpleErrorType = errors.SimpleErrorType

SimpleErrorType is the Simpler Error Type returned by the error_handler middleware

type TypedError

type TypedError = errors.TypedError

TypedError is the TypedError Interface created by a EMFErrorHandler

type User

type User = *jwt.Token

User is an internal representation of a user per HTTP request.

Jump to

Keyboard shortcuts

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