Documentation ¶
Index ¶
- Constants
- type DBConfig
- type DBType
- type MongoAccessLogConfig
- type MongoConfig
- type MongoConnectionConfig
- func (this *MongoConnectionConfig) AuthMechanismPropertiesMap() map[string]string
- func (this *MongoConnectionConfig) AuthMechanismPropertiesString() string
- func (this *MongoConnectionConfig) Save() error
- func (this *MongoConnectionConfig) URI() string
- func (this *MongoConnectionConfig) URIMask() string
Constants ¶
View Source
const ( DBConfigFile = "db.conf" DBTypeMongo = "mongo" DBTypeMySQL = "mysql" DBTypePostgres = "postgres" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoAccessLogConfig ¶
type MongoConfig ¶
type MongoConfig struct { URI string `yaml:"uri" json:"uri"` AccessLog *MongoAccessLogConfig `yaml:"accessLog" json:"accessLog"` }
MongoDB配置
type MongoConnectionConfig ¶
type MongoConnectionConfig struct { Scheme string `json:"scheme"` Username string `json:"username"` Password string `json:"password"` Host string `json:"host"` Port uint `json:"port"` AuthMechanism string `json:"authMechanism"` AuthMechanismProperties []*shared.Variable `json:"authMechanismProperties"` RequestURI string `json:"requestURI"` // @TODO 未来版本需要实现 }
MongoDB连接配置
func (*MongoConnectionConfig) AuthMechanismPropertiesMap ¶
func (this *MongoConnectionConfig) AuthMechanismPropertiesMap() map[string]string
取得Map形式的认证属性
func (*MongoConnectionConfig) AuthMechanismPropertiesString ¶
func (this *MongoConnectionConfig) AuthMechanismPropertiesString() string
取得字符串形式的认证属性
func (*MongoConnectionConfig) Save ¶
func (this *MongoConnectionConfig) Save() error
保存修改后的MongoDB配置
func (*MongoConnectionConfig) URIMask ¶
func (this *MongoConnectionConfig) URIMask() string
组合后的URI,但是对URI进行掩码
Click to show internal directories.
Click to hide internal directories.