Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext interface {
GetPrefix() string
GetName() string
GetEnvName() string
Get(id string) (interface{}, bool)
MustGet(id string) interface{}
Load() error
Stop() error
Logger(prefix string) Logger
OutEnv()
}
func NewAppContext ¶
func NewAppContext(opts ...Option) AppContext
type AppLogger ¶
func GlobalLogger ¶
func GlobalLogger() AppLogger
type Component ¶
type Component interface {
ID() string
InitFlags()
Run(AppContext) error
Stop() error
}
type Logger ¶
type Logger interface {
GetLevel() string
Print(args ...interface{})
Printf(format string, args ...interface{})
Debug(args ...interface{})
Debugf(format string, args ...interface{})
Info(args ...interface{})
Infof(format string, args ...interface{})
Warn(args ...interface{})
Warnf(format string, args ...interface{})
Error(err error, args ...interface{})
Errorf(err error, format string, args ...interface{})
Fatal(err error, args ...interface{})
Fatalf(err error, format string, args ...interface{})
}
Directories
¶
| Path | Synopsis |
|---|---|
|
component
|
|
|
examples
|
|
|
asyncjob
command
|
|
|
cli
command
|
|
|
component
command
|
|
|
mail
command
|
|
|
server/gin
command
|
|
|
token/jwt
command
|
|
|
token/paseto
command
|
|
Click to show internal directories.
Click to hide internal directories.