Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StageDev . StageDev = "DEV" // StageQA . StageQA = "QA" // StagePreLive . StagePreLive = "PRELIVE" // StageLive . StageLive = "LIVE" )
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext struct { echo.Context Data interface{} Sec *SecuritySessionValidate }
AppContext Contexto personalizado de Echo
func (AppContext) BindPipe ¶
func (c AppContext) BindPipe(i interface{}) interface{}
GetResponse retorna una variable guardada y que es de tipo Tipo model.Response
func (AppContext) StatusOK ¶
func (c AppContext) StatusOK(data interface{}) error
type ErrorItems ¶
type ErrorItems struct { AppContext errors.HTTPErrorPanic TapFunc func(AppContext, errors.HTTPErrorPanic) error }
type ErrorsConfig ¶
type ErrorsConfig struct {
AppStage string
}
type ExceptionItems ¶
type GuardFunc ¶
type GuardFunc func(AppContext) (interface{}, error)
type HandlerAppFunc ¶
type HandlerAppFunc func(AppContext) error
type Interceptor ¶
type Interceptor struct{}
func (Interceptor) ErrorsConfig ¶
func (i Interceptor) ErrorsConfig(conf ErrorsConfig) echo.HTTPErrorHandler
func (Interceptor) Request ¶
func (i Interceptor) Request(items InterceptorItems) echo.HandlerFunc
APIKey valida el apikey de las consultas a la aplicacion
type InterceptorError ¶
type InterceptorError struct {
Error func(AppContext, errors.HTTPErrorPanic) error
}
type InterceptorItems ¶
type InterceptorItems struct { Pipe PipeFunc Guard GuardFunc Handler HandlerAppFunc Error ExceptionItems }
type Middleware ¶
type Middleware struct{}
Middleware .
func (Middleware) AddCors ¶
func (m Middleware) AddCors() echo.MiddlewareFunc
func (Middleware) AppContext ¶
func (m Middleware) AppContext() echo.MiddlewareFunc
func (Middleware) EchoRecovery ¶
func (m Middleware) EchoRecovery() echo.MiddlewareFunc
func (Middleware) EchoRecoveryConfig ¶
func (m Middleware) EchoRecoveryConfig(conf RecoverConfig) echo.MiddlewareFunc
type PipeFunc ¶
type PipeFunc func(AppContext) interface{}
type RecoverConfig ¶
type RecoverConfig struct { DisablePrintStack bool // contains filtered or unexported fields }
RecoverConfig .
type SecuritySessionValidate ¶
type SecuritySessionValidate struct { Success bool `json:"success"` Info struct { Sessions int8 `json:"sessions"` AliveSessions int8 `json:"aliveSessions"` UserActive int8 `json:"userActive"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` SolutionID string `json:"solutionId"` UserID uint32 `json:"userId"` CustomerID uint32 `json:"customerId"` Token string `json:"token"` ExpDatetime string `json:"expDatetime"` RegistrationComplete bool `json:"registrationComplete"` } TokenExpired bool `json:"tokenExpired"` UserActive int8 `json:"userActive"` }
SecuritySessionValidate .
type TapFunc ¶
type TapFunc func(AppContext, errors.HTTPErrorPanic) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.