Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthenticationExpired = errors.NewPublic("认证过期,请重新登录")
View Source
var ErrCodeFrequently = errors.NewPublic("您的验证码请求频繁,请稍后再试")
View Source
var ErrEmailInvalid = errors.NewPublic("邮箱验证码无效")
View Source
var ErrEmailNotExists = errors.NewPublic("该账户不存在或被冻结")
View Source
var ErrLoginInvalid = errors.NewPublic("登录验证无效")
View Source
var ErrLoginMaxFailures = errors.NewPublic("登录失败超出最大次数")
View Source
var ErrLoginNotExists = errors.NewPublic("登录账号不存在或被冻结")
View Source
var ErrSession = errors.NewPrivate("会话建立失败")
View Source
var ErrSessionInconsistent = errors.NewPublic("会话令牌不一致")
View Source
var ErrSmsInvalid = errors.NewPublic("短信验证码无效")
View Source
var ErrSmsNotExists = errors.NewPublic("该账户不存在或被冻结")
View Source
var ErrTotpInvalid = errors.NewPublic("口令验证码无效")
Functions ¶
func ClearAccessToken ¶ added in v0.1.0
func ClearAccessToken(c *app.RequestContext)
func SetAccessToken ¶ added in v0.1.0
func SetAccessToken(c *app.RequestContext, ts string)
Types ¶
type Extra ¶ added in v0.1.0
type Extra struct { BaseUrl string `yaml:"base_url"` IpAddress string `yaml:"ip_address"` IpSecretId string `yaml:"ip_secret_id"` IpSecretKey string `yaml:"ip_secret_key"` SmsSecretId string `yaml:"sms_secret_id"` SmsSecretKey string `yaml:"sms_secret_key" secret:"*"` SmsAppId string `yaml:"sms_app_id"` SmsRegion string `yaml:"sms_region"` EmqxHost string `yaml:"emqx_host"` EmqxApiKey string `yaml:"emqx_api_key"` EmqxSecretKey string `yaml:"emqx_secret_key" secret:"*"` *values.DynamicValues `yaml:"dynamic_values"` }
type Values ¶
type Values struct { Mode string `env:"MODE" envDefault:"debug"` Address string `env:"ADDRESS" envDefault:":3000"` Hostname string `env:"HOSTNAME"` Namespace string `env:"NAMESPACE,required"` Key string `env:"KEY,required"` Database struct { Url string `env:"URL,required"` Name string `env:"NAME,required"` Redis string `env:"REDIS,required"` } `envPrefix:"DATABASE_"` Influx struct { Url string `env:"URL"` Org string `env:"ORG"` Token string `env:"TOKEN"` Bucket string `env:"BUCKET"` } `envPrefix:"INFLUX_"` Nats struct { Hosts []string `env:"HOSTS,required" envSeparator:","` Nkey string `env:"NKEY,required"` } `envPrefix:"NATS_"` Otlp struct { Endpoint string `env:"ENDPOINT"` } `envPrefix:"OTLP_"` *Extra }
Click to show internal directories.
Click to hide internal directories.