Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedFormat ¶
type AllowedFormat struct {
// contains filtered or unexported fields
}
func (*AllowedFormat) Set ¶
func (f *AllowedFormat) Set(s string) error
func (*AllowedFormat) String ¶
func (f *AllowedFormat) String() string
type AllowedLevel ¶
type AllowedLevel struct {
// contains filtered or unexported fields
}
func (*AllowedLevel) GetLevelOption ¶
func (l *AllowedLevel) GetLevelOption() level.Option
func (*AllowedLevel) Set ¶
func (l *AllowedLevel) Set(s string) error
func (*AllowedLevel) String ¶
func (l *AllowedLevel) String() string
type Config ¶
type Config struct { Version string Database *DatabaseConfig `kiper_config:"name:database"` Log *LogConfig `kiper_config:"name:log"` Server *ServerConfig `kiper_config:"name:server"` Register *RegisterConfig `kiper_config:"name:register"` Cors *CorsConfig `kiper_config:"name:cors"` }
type CorsConfig ¶
type DatabaseConfig ¶
type DatabaseConfig struct { Type *DBType `kiper_value:"name:type;help:database type;default:mysql"` MaxOpenConns int `kiper_value:"name:max_open_conns;help:max open connections of db;default:0"` MaxIdleConns int `kiper_value:"name:max_idle_conns;help:max idle connections of db;default:20"` Host string `kiper_value:"name:host;help:database host;default:127.0.0.1"` User string `kiper_value:"name:user;help:database user;default:root"` Password string `kiper_value:"name:password;help:database password"` Port *Port `kiper_value:"name:port;help:database port;default:3306"` DB string `kiper_value:"name:db;help:db name"` }
type LogConfig ¶
type LogConfig struct { Level *AllowedLevel `kiper_value:"name:level;help:log level = debug, info, warn, error;default:info"` Format *AllowedFormat `kiper_value:"name:format;help:log format = json, logfmt;default:logfmt"` File *string `kiper_value:"name:file;help:log file path"` }
type RegisterConfig ¶
type ServerConfig ¶
type ServerConfig struct {
Port *Port `kiper_value:"name:port;help:server listen port;default:8010"`
}
type ViewConfig ¶
type ViewConfig struct {
Path string `kiper_value:"name:path;help:path of html view files;default:./views"`
}
Click to show internal directories.
Click to hide internal directories.