Documentation ¶
Overview ¶
Package core handles most of the common db, config and proto initialization.
Index ¶
- Variables
- func WaitUntilInterrupt()
- type App
- type Config
- func (cfg *Config) Dir() string
- func (cfg *Config) Exists(section string) bool
- func (cfg *Config) Get(section string, v interface{}) (error, bool)
- func (cfg *Config) IsModified() bool
- func (cfg *Config) Path() string
- func (c *Config) Section(name string) *Section
- func (cfg *Config) Set(section string, v interface{}) error
- func (cfg *Config) Write() error
- type ErrConfNotFound
- type LogLevel
- type Logger
- func (l *Logger) Criticalf(format string, v ...interface{})
- func (l *Logger) Criticalln(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Debugln(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Errorln(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Fatalln(v ...interface{})
- func (l *Logger) GetLevel() LogLevel
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Infoln(v ...interface{})
- func (l *Logger) SetLevel(level LogLevel)
- func (l *Logger) Warnf(format string, v ...interface{})
- func (l *Logger) Warnln(v ...interface{})
- type Section
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLog = New( LogLevelDebug, log.New(os.Stderr, "", log.LstdFlags), )
View Source
var ErrNoFile = errors.New("config: No file specified")
Functions ¶
func WaitUntilInterrupt ¶
func WaitUntilInterrupt()
Types ¶
type App ¶
type App struct { AppName string ModuleName string Config *Config Log *Logger ClientFactory sarif.ClientFactory }
func (*App) ClientDial ¶
func (*App) InitClientFactory ¶
func (*App) WriteConfig ¶
func (app *App) WriteConfig()
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func FindConfig ¶
func (*Config) IsModified ¶
type ErrConfNotFound ¶
type ErrConfNotFound struct {
Section string
}
func (ErrConfNotFound) Error ¶
func (e ErrConfNotFound) Error() string
type Logger ¶
func (*Logger) Criticalln ¶
func (l *Logger) Criticalln(v ...interface{})
Click to show internal directories.
Click to hide internal directories.