Documentation ¶
Index ¶
- Constants
- Variables
- type Binder
- type ErrorHandler
- type Logger
- func (self Logger) Close(ctx context.Context) error
- func (self Logger) Debug(i ...interface{})
- func (self Logger) Debugf(format string, i ...interface{})
- func (self Logger) Error(i ...interface{})
- func (self Logger) Errorf(format string, i ...interface{})
- func (self Logger) Fatal(i ...interface{})
- func (self Logger) Fatalf(format string, i ...interface{})
- func (self Logger) Flush()
- func (self Logger) GLevel() gommon.Lvl
- func (self *Logger) Header() string
- func (self Logger) Info(i ...interface{})
- func (self Logger) Infof(format string, i ...interface{})
- func (self Logger) Logger() *zerolog.Logger
- func (self Logger) Output() io.Writer
- func (self Logger) PLevel() pgx.LogLevel
- func (self Logger) Panic(i ...interface{})
- func (self Logger) Panicf(format string, i ...interface{})
- func (self Logger) Prefix() string
- func (self Logger) Print(i ...interface{})
- func (self Logger) Printf(format string, i ...interface{})
- func (self *Logger) SetGLevel(l gommon.Lvl)
- func (self *Logger) SetHeader(h string)
- func (self *Logger) SetLogger(l zerolog.Logger)
- func (self *Logger) SetOutput(w io.Writer)
- func (self *Logger) SetPLevel(l pgx.LogLevel)
- func (self *Logger) SetPrefix(p string)
- func (self Logger) SetVerbose(v bool)
- func (self *Logger) SetZLevel(l zerolog.Level)
- func (self Logger) Verbose() bool
- func (self Logger) Warn(i ...interface{})
- func (self Logger) Warnf(format string, i ...interface{})
- func (self Logger) ZLevel() zerolog.Level
- type MigrateLogger
- type Migrator
- type Renderer
- func (self *Renderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error
- func (self *Renderer) RenderBytes(template string, data interface{}) ([]byte, error)
- func (self *Renderer) RenderStd(w io.Writer, template string, data interface{}) error
- func (self *Renderer) RenderString(template string, data interface{}) (string, error)
- type Serializer
- type Validator
Constants ¶
View Source
const POSTGRES_DSN = "postgresql://%s:%s@%s:%d/%s?sslmode=%s&x-multi-statement=true"
Variables ¶
View Source
var ( ZlevelToGlevel = map[zerolog.Level]gommon.Lvl{ zerolog.DebugLevel: gommon.DEBUG, zerolog.InfoLevel: gommon.INFO, zerolog.WarnLevel: gommon.WARN, zerolog.ErrorLevel: gommon.ERROR, zerolog.Disabled: gommon.OFF, } GlevelToZlevel = map[gommon.Lvl]zerolog.Level{ gommon.DEBUG: zerolog.DebugLevel, gommon.INFO: zerolog.InfoLevel, gommon.WARN: zerolog.WarnLevel, gommon.ERROR: zerolog.ErrorLevel, gommon.OFF: zerolog.Disabled, } ZlevelToPlevel = map[zerolog.Level]pgx.LogLevel{ zerolog.TraceLevel: pgx.LogLevelTrace, zerolog.DebugLevel: pgx.LogLevelDebug, zerolog.InfoLevel: pgx.LogLevelInfo, zerolog.WarnLevel: pgx.LogLevelWarn, zerolog.ErrorLevel: pgx.LogLevelError, zerolog.Disabled: pgx.LogLevelNone, } PlevelToZlevel = map[pgx.LogLevel]zerolog.Level{ pgx.LogLevelTrace: zerolog.TraceLevel, pgx.LogLevelDebug: zerolog.DebugLevel, pgx.LogLevelInfo: zerolog.InfoLevel, pgx.LogLevelWarn: zerolog.WarnLevel, pgx.LogLevelError: zerolog.ErrorLevel, pgx.LogLevelNone: zerolog.Disabled, } )
View Source
var ErrBinderGeneric = internal.NewError("Binder failed")
View Source
var ErrErrorHandlerGeneric = internal.NewError("Error handler failed")
View Source
var ErrMigratorGeneric = internal.NewError("Migrator failed")
View Source
var ErrRendererGeneric = internal.NewError("Renderer failed")
View Source
var ErrSerializerGeneric = internal.NewError("Serializer failed")
View Source
var ErrValidatorGeneric = internal.NewError("Validator failed")
View Source
var TEMPLATE_EXTENSIONS = regexp.MustCompile(`^.*\.(html|txt|md)$`)
Functions ¶
This section is empty.
Types ¶
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶
func NewErrorHandler(configuration internal.Configuration, logger Logger) *ErrorHandler
func (*ErrorHandler) Handle ¶
func (self *ErrorHandler) Handle(err error, ctx echo.Context)
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(configuration internal.Configuration) *Logger
func (Logger) SetVerbose ¶
type MigrateLogger ¶
type MigrateLogger struct {
// contains filtered or unexported fields
}
func NewMigrateLogger ¶
func NewMigrateLogger(logger Logger) *MigrateLogger
func (MigrateLogger) Printf ¶
func (self MigrateLogger) Printf(format string, v ...interface{})
func (MigrateLogger) Verbose ¶
func (self MigrateLogger) Verbose() bool
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func NewMigrator(configuration internal.Configuration, logger Logger) (*Migrator, error)
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer(configuration internal.Configuration, logger Logger) *Renderer
func (*Renderer) RenderBytes ¶
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
func NewSerializer ¶
func NewSerializer(configuration internal.Configuration, logger Logger) *Serializer
func (*Serializer) Deserialize ¶
func (self *Serializer) Deserialize(c echo.Context, i interface{}) error
func (*Serializer) Serialize ¶
func (self *Serializer) Serialize(c echo.Context, i interface{}, indent string) error
Click to show internal directories.
Click to hide internal directories.