Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UtilsSet = wire.NewSet( NewLogger, NewConfig, NewValidator, )
Functions ¶
func NewValidator ¶
Types ¶
type Config ¶
type Config struct {
Mode string `env:"MODE" envDefault:"dev"`
Listen string `env:"LISTEN" envDefault:":8080"`
DataPath string `env:"DATA_PATH" envDefault:"./data"`
Log LogConfig
Storage StorageConfig
DatabaseConfig DatabaseConfig
}
type DatabaseConfig ¶
type Logger ¶
type Logger interface {
Debugf(template string, args ...interface{})
Debugw(template string, keysAndValues ...interface{})
Infof(template string, args ...interface{})
Infow(template string, keysAndValues ...interface{})
Warnf(template string, args ...interface{})
Warnw(template string, keysAndValues ...interface{})
Errorf(template string, args ...interface{})
Errorw(template string, keysAndValues ...interface{})
Panicf(template string, args ...interface{})
Panicw(template string, keysAndValues ...interface{})
}
type StorageConfig ¶
type StorageConfig struct {
Type string `env:"STORAGE_TYPE" envDefault:"local"`
Path string `env:"STORAGE_PATH" envDefault:"./data/cover"`
Endpoint string `env:"STORAGE_ENDPOINT" envDefault:"localhost:9000"`
BucketName string `env:"STORAGE_BUCKET_NAME" envDefault:"jav-cover"`
AccessKey string `env:"STORAGE_ACCESS_KEY"`
SecretKey string `env:"STORAGE_SECRET_KEY"`
}
Click to show internal directories.
Click to hide internal directories.