ctxs

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerTypeHTTP = "http"
	ServerTypeCron = "cron"
	ServerTypeMQ   = "mq"
)

Variables

This section is empty.

Functions

func NewHerContext

func NewHerContext(c *gin.Context) *herContext

Types

type Context

type Context struct {
	Log     ILog
	ToolBox component.IToolBox
	Type    string
	// contains filtered or unexported fields
}

func GetContext

func GetContext(c *gin.Context) *Context

func GetCronContext

func GetCronContext() *Context

func GetMQContext

func GetMQContext(msg string) *Context

func (*Context) CheckStruct

func (c *Context) CheckStruct(data interface{}) error

func (Context) GetBody

func (h Context) GetBody() string

func (*Context) Put

func (c *Context) Put()

type FileSplitHook

type FileSplitHook struct {
	// contains filtered or unexported fields
}

func NewFileSplitHook

func NewFileSplitHook() *FileSplitHook

func (*FileSplitHook) Fire

func (f *FileSplitHook) Fire(e *logrus.Entry) (err error)

func (*FileSplitHook) Levels

func (f *FileSplitHook) Levels() []logrus.Level

type Formatter

type Formatter struct {
	TimestampFormat string
	LogFormat       string
}

func (*Formatter) Format

func (f *Formatter) Format(entry *logrus.Entry) ([]byte, error)

type ILog

type ILog interface {
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Infoln(args ...interface{})

	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Debugln(args ...interface{})

	Warn(args ...interface{})
	Warnf(format string, args ...interface{})
	Warnln(args ...interface{})

	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Errorln(args ...interface{})

	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	Fatalln(args ...interface{})
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

func (*Logger) Debug

func (l *Logger) Debug(args ...interface{})

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

func (*Logger) Debugln

func (l *Logger) Debugln(args ...interface{})

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Errorln

func (l *Logger) Errorln(args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, args ...interface{})

func (*Logger) Fatalln

func (l *Logger) Fatalln(args ...interface{})

func (*Logger) Info

func (l *Logger) Info(args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) Infoln

func (l *Logger) Infoln(args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

func (*Logger) Warnln

func (l *Logger) Warnln(args ...interface{})

type Response

type Response struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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