Documentation
¶
Index ¶
- type AdminConfig
- type AllowedFormat
- type AllowedLevel
- type AppleLoginConfig
- type AvatarConfig
- type Config
- type CorsConfig
- type DBType
- type DatabaseConfig
- type GoogleLoginConfig
- type JWTConfig
- type LogConfig
- type MailConfig
- type PlutoConfig
- type PlutoValue
- type Port
- type RSAConfig
- type SMTP
- type ServerConfig
- type ViewConfig
- type WechatLoginConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminConfig ¶ added in v0.4.0
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 AppleLoginConfig ¶ added in v0.2.0
type AppleLoginConfig struct {
TeamID string `kiper_value:"name:team_id;help:apple team id"`
BundleID string `kiper_value:"name:bundle_id;help:apple bundle id"`
ClientID string `kiper_value:"name:client_id;help:apple service id"`
KeyID string `kiper_value:"name:key_id;help:apple key id"`
P8CertFile string `kiper_value:"name:p8_cert_file;help:p8 cert file path"`
RedirectURL string `kiper_value:"name:redirect_url;help:redirect url"`
}
type AvatarConfig ¶
type AvatarConfig struct {
Bucket *string `kiper_value:"name:bucket;help:aliyun oss bucket"`
EndPoint *string `kiper_value:"name:endpoint;help:end point"`
AccessKeyID *string `kiper_value:"name:accesskeyid;help:access key id"`
AccessKeySecret *string `kiper_value:"name:accesskeysecret;help:access key secret"`
CDN *string `kiper_value:"name:cdn;help:cdn url"`
}
type Config ¶
type Config struct {
Version string
Server *ServerConfig `kiper_config:"name:server"`
Log *LogConfig `kiper_config:"name:log"`
RSA *RSAConfig `kiper_config:"name:rsa"`
Database *DatabaseConfig `kiper_config:"name:database"`
Mail *MailConfig `kiper_config:"name:mail"`
Avatar *AvatarConfig `kiper_config:"name:avatar"`
GoogleLogin *GoogleLoginConfig `kiper_config:"name:google_login"`
WechatLogin *WechatLoginConfig `kiper_config:"name:wechat_login"`
AppleLogin *AppleLoginConfig `kiper_config:"name:apple_login"`
JWT *JWTConfig `kiper_config:"name:jwt"`
View *ViewConfig `kiper_config:"name:view"`
Admin *AdminConfig `kiper_config:"name:admin"`
Cors *CorsConfig `kiper_config:"name:cors"`
}
type CorsConfig ¶ added in v0.4.0
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;default:pluto"`
}
type GoogleLoginConfig ¶
type GoogleLoginConfig struct {
Aud *string `kiper_value:"name:aud;help:audience"`
}
type JWTConfig ¶
type JWTConfig struct {
AccessTokenExpire int64 `kiper_value:"name:access_token_expire;help:expire time(s) of access token;default:3600"`
ResetPasswordTokenExpire int64 `kiper_value:"name:reset_password_token_expire;help:expire time(s) of reset password token;default:36000"`
RegisterVerifyTokenExpire int64 `kiper_value:"name:register_verify_token_expire;help:expire time(s) of reset password result token;default:36000"`
}
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 MailConfig ¶
type PlutoConfig ¶
type PlutoConfig interface {
}
type PlutoValue ¶
type ServerConfig ¶
type ViewConfig ¶
type ViewConfig struct {
Path string `kiper_value:"name:path;help:path of html view files;default:./views"`
}
type WechatLoginConfig ¶
Click to show internal directories.
Click to hide internal directories.