Documentation
¶
Index ¶
- Constants
- type AliYunConf
- type AuthConf
- type AuthUserInfo
- type Database
- type DevLinkConf
- type EventConf
- type FileProxyConf
- type LoginSafeCtlInfo
- type MapConf
- type MinioConf
- type ModeConf
- type MqttConf
- type NatsConf
- type OssConf
- type ProxyConf
- type RpcClientConf
- type StaticProxyConf
- type WrongPasswordCounter
Constants ¶
View Source
const ( Mysql = "mysql" Pgsql = "pgsql" Sqlite = "sqlite" )
View Source
const ( EventModeNats = "nats" //使用nats来通讯 EventModeDirect = "direct" //直接调用 )
View Source
const ( ClientModeGrpc = "grpc" ClientModeDirect = "direct" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliYunConf ¶ added in v0.5.1
type AliYunConf struct {
OssConf
}
阿里云oss配置
func (AliYunConf) GenClientOption ¶ added in v0.5.1
func (a AliYunConf) GenClientOption() []oss.ClientOption
func (AliYunConf) GetEndPoint ¶ added in v0.5.1
func (a AliYunConf) GetEndPoint() string
type AuthConf ¶ added in v0.3.0
type AuthConf struct { IpRange []string `json:",optional"` //白名单ip 及ip段 Users []AuthUserInfo }
type AuthUserInfo ¶ added in v0.3.0
type DevLinkConf ¶
type FileProxyConf ¶ added in v0.5.1
type FileProxyConf struct { FrontDir string `json:",default=./dist"` //前端文件路径 FrontDefaultPage string `json:",default=front/iThingsCore/index.html"` //前端默认文件地址 }
文件反向代理
type LoginSafeCtlInfo ¶ added in v0.5.1
type MinioConf ¶
type MinioConf struct {
OssConf
}
minio本地存储配置
func (MinioConf) GetEndPoint ¶ added in v0.5.1
type OssConf ¶ added in v0.5.1
type OssConf struct { OssType string `json:",options=minio|aliyun"` AccessKeyID string AccessKeySecret string PublicBucketName string TemporaryBucketName string //临时桶,30分钟有效期 PrivateBucketName string Location string UseSSL bool `json:",optional"` CustomHost string `json:",default=127.0.0.1:7777"` //api访问地址 ConnectTimeout int64 ReadWriteTimeout int64 }
type ProxyConf ¶ added in v0.3.0
type ProxyConf struct { FileProxy []*FileProxyConf `json:",optional"` StaticProxy []*StaticProxyConf `json:",optional"` }
type RpcClientConf ¶
type RpcClientConf struct { Conf zrpc.RpcClientConf `json:",optional"` ModeConf }
type StaticProxyConf ¶ added in v0.5.1
type StaticProxyConf struct { Router string //原路由 Dest string //目标路由 DeletePrefix bool `json:",optional"` //是否删除原路由路径 }
http反向代理
type WrongPasswordCounter ¶ added in v0.5.1
type WrongPasswordCounter struct { Captcha int `json:",default=5"` Account []struct { Statistics int `json:",default=1440"` TriggerTimes int `json:",default=10"` ForbiddenTime int `json:",default=10"` } Ip []struct { Statistics int `json:",default=1440"` TriggerTimes int `json:",default=200"` ForbiddenTime int `json:",default=60"` } }
func (WrongPasswordCounter) ParseWrongPassConf ¶ added in v0.5.1
func (counter WrongPasswordCounter) ParseWrongPassConf(userID string, ip string) []*LoginSafeCtlInfo
Click to show internal directories.
Click to hide internal directories.