lex

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 7 Imported by: 0

README

lex

Example

Documentation

Index

Constants

View Source
const (
	Method = "method"
	Module = "module"
	App    = "app"
	IP     = "ip"
)

Variables

View Source
var AppName string

Functions

func GetLogger

func GetLogger(logFile string, level string, withStdout bool) zerolog.Logger

func NewLog

func NewLog(filename string, writers ...io.Writer) zerolog.Logger

Types

type CodeError

type CodeError struct {
	App       string `json:",omitempty"`
	ErrorCode stderrorcode.ErrorCode
	Message   string
}

func NewCodeError

func NewCodeError(code stderrorcode.ErrorCode, message string) *CodeError

func (*CodeError) Error

func (s *CodeError) Error() string

type FieldError

type FieldError struct {
	CodeError
	FieldErrors map[string]string
}

func NewFieldError

func NewFieldError(fieldErrors map[string]string) *FieldError

func NewFieldErrorKV

func NewFieldErrorKV(kvs ...string) *FieldError

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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