Versions in this module Expand all Collapse all v1 v1.0.0 Apr 15, 2020 Changes in this version + const EncodingGob + const EncodingJSON + const MethodPostGob + const MethodPutGob + func DecodeEMFError(r io.Reader, eh errors.EMFErrorHandler) (e *errors.EMFErrorType) + func NewEMFErrorHandler(c echo.Context, isDebug bool, opts ...errors.HandlerOption) (eh *errors.EMFErrorHandlerType) + type Client interface + Do func(req *http.Request) (res *http.Response, err error) + type EMFContext interface + GetClaim func(claim string) (c string, err error) + GetLimitAndOffset func() (limit int, offset int, err error) + GetRequestHandler func() RequestHandler + GetRequestID func() string + GetRequestLimited func(domain, path string) (req *http.Request, err error) + type EMFContextType struct + func NewEMFContext(c echo.Context, cfg configurer.ConfigReader, opts ...Option) (ctx *EMFContextType) + func (ctx *EMFContextType) ErrorHandler() errors.EMFErrorHandler + func (ctx *EMFContextType) GetClaim(claim string) (c string, err error) + func (ctx *EMFContextType) GetLimitAndOffset() (limit int, offset int, err error) + func (ctx *EMFContextType) GetRequestHandler() RequestHandler + func (ctx *EMFContextType) GetRequestID() string + func (ctx *EMFContextType) GetRequestLimited(domain, path string) (req *http.Request, err error) + func (ctx *EMFContextType) IsDebug() bool + func (ctx *EMFContextType) Logger() echo.Logger + func (ctx *EMFContextType) NewError(code string, data map[string]interface{}, errors ...error) error + type LoggerlessRequestHandler interface + ErrorHandler func() errors.EMFErrorHandler + GetDefaultLimit func() (limit int) + GetDomain func(component string) (domain string) + GetMaxLimit func() (limit int) + GetRequest func(component, path string) (*http.Request, error) + GobRequest func(method, component, path string, input interface{}) (*http.Request, error) + Header func() http.Header + InitRequest func(encodingType string, method string, domain string, path string, ...) (req *http.Request, err error) + IsDebug func() bool + JSONRequest func(method, component, path string, input interface{}) (*http.Request, error) + NewError func(code string, data map[string]interface{}, errors ...error) error + Requester func(method, component, path string, input, output interface{}) error + SendRequest func(request *http.Request, output interface{}) error + type Option func(*EMFContextType) + func WithContextClient(client *http.Client) Option + func WithRequestHandler(rh RequestHandler) Option + type RHOption func(*RequestHandlerType) + func WithDebugMode() RHOption + func WithHTTPClient(client Client) RHOption + func WithHeaders(headers http.Header) RHOption + type RequestHandler interface + Logger func() echo.Logger + type RequestHandlerType struct + func NewRequestHandler(cfg configurer.ConfigReader, logger echo.Logger, opts ...RHOption) (rh *RequestHandlerType) + func (rh RequestHandlerType) ErrorHandler() errors.EMFErrorHandler + func (rh RequestHandlerType) GetDefaultLimit() (limit int) + func (rh RequestHandlerType) GetDomain(component string) (domain string) + func (rh RequestHandlerType) GetMaxLimit() (limit int) + func (rh RequestHandlerType) GetRequest(domain, path string) (req *http.Request, err error) + func (rh RequestHandlerType) GobRequest(method, domain, path string, input interface{}) (req *http.Request, err error) + func (rh RequestHandlerType) Header() http.Header + func (rh RequestHandlerType) InitRequest(encodingType string, method string, domain string, path string, ...) (req *http.Request, err error) + func (rh RequestHandlerType) IsDebug() bool + func (rh RequestHandlerType) JSONRequest(method, domain, path string, input interface{}) (req *http.Request, err error) + func (rh RequestHandlerType) Logger() echo.Logger + func (rh RequestHandlerType) NewError(code string, data map[string]interface{}, errors ...error) error + func (rh RequestHandlerType) Requester(method string, component string, path string, input interface{}, ...) (err error) + func (rh RequestHandlerType) SendRequest(req *http.Request, output interface{}) (err error)