Documentation ¶
Index ¶
- type AdminConfig
- type AllowedFormat
- type AllowedLevel
- type AppleLoginConfig
- type AvatarConfig
- type Config
- type CorsConfig
- type DBType
- type DatabaseConfig
- type GoogleLoginConfig
- type LogConfig
- type MailConfig
- type OAuthConfig
- type PlutoConfig
- type PlutoValue
- type Port
- type RSAConfig
- type RegistryConfig
- type SMTP
- type ServerConfig
- type TokenConfig
- 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 AdminConfig struct {
Mail string `kiper_value:"name:mail;help:default mail register for pluto admin"`
}
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"` Token *TokenConfig `kiper_config:"name:token"` View *ViewConfig `kiper_config:"name:view"` Admin *AdminConfig `kiper_config:"name:admin"` Cors *CorsConfig `kiper_config:"name:cors"` Registry *RegistryConfig `kiper_config:"name:registry"` OAuth *OAuthConfig `kiper_config:"name:oauth"` }
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 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 OAuthConfig ¶ added in v1.0.0
type OAuthConfig struct {
AuthorizeCodeExpire int `kiper_value:"name:authorize_code_expire;help:expire time(s) of authorize;default:3600"`
}
type PlutoConfig ¶
type PlutoConfig interface { }
type PlutoValue ¶
type RegistryConfig ¶ added in v1.0.0
type RegistryConfig struct { Consul bool `kiper_value:"name:consul;help:use consul register;default:false"` ConsulAddress string `kiper_value:"name:consul_address;help:consul address;default:127.0.0.1"` ConsulPort *Port `kiper_value:"name:consul_port;help:consul port;default:8500"` ServiceName string `kiper_value:"name:service_name;help:register service name;default:pluto"` }
type ServerConfig ¶
type ServerConfig struct { // skip sending verify mail when mail register SkipRegisterVerifyMail bool `kiper_value:"name:skip_register_verify_mail;default:false"` Port *Port `kiper_value:"name:port;help:server listen port;default:8010"` CookieSecure bool `kiper_value:"name:cookie_secure;cookie secure;default:true"` ServerName string `kiper_value:"name:server_name;help:server name;default:pluto"` }
type TokenConfig ¶ added in v1.0.0
type TokenConfig 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"` RefreshTokenExpire int64 `kiper_value:"name:refresh_token_expire;help:expire time(s) of refresh token;default:2419200"` }
type ViewConfig ¶
type WechatLoginConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.