Documentation
¶
Index ¶
- Constants
- Variables
- func Load(typ string, name string, secret Secret) error
- func LoadWithFS(typ string, name string, secret Secret, fs FileSystem) error
- func Path() string
- func SetFileSystem(fs FileSystem)
- type Cassandra
- type CassandraMeta
- type Database
- type DatabaseMeta
- type DefaultFileSystem
- type DefaultSecret
- type FileSystem
- type Redis
- type RedisClusterSecret
- type RedisMeta
- type RedisProfile
- type Secret
Constants ¶
View Source
const ( RedisModeSingle = "single" RedisModeReplication = "replication" RedisModeCluster = "cluster" )
Variables ¶
View Source
var PATH = ""
Functions ¶
func LoadWithFS ¶
func LoadWithFS(typ string, name string, secret Secret, fs FileSystem) error
func SetFileSystem ¶
func SetFileSystem(fs FileSystem)
Types ¶
type Cassandra ¶
type Cassandra struct {
DefaultSecret
Writer CassandraMeta `json:"writer"`
Reader CassandraMeta `json:"reader"`
}
type CassandraMeta ¶
type Database ¶
type Database struct {
DefaultSecret
Writer DatabaseMeta `json:"writer"`
Reader DatabaseMeta `json:"reader"`
}
func DatabaseProfile ¶
func DatabaseProfileWithFS ¶
func DatabaseProfileWithFS(name string, fs FileSystem) *Database
type DatabaseMeta ¶
type DefaultFileSystem ¶
type DefaultFileSystem struct{}
func NewDefaultFileSystem ¶
func NewDefaultFileSystem() *DefaultFileSystem
type DefaultSecret ¶
type DefaultSecret struct {
// contains filtered or unexported fields
}
func (*DefaultSecret) Name ¶
func (d *DefaultSecret) Name() string
func (*DefaultSecret) Path ¶
func (d *DefaultSecret) Path() string
type FileSystem ¶
type Redis ¶
type Redis struct {
DefaultSecret
Mode string `json:"mode"`
Username string `json:"username"`
Password string `json:"password"`
DB int `json:"db"`
Master RedisMeta `json:"master"`
Slave RedisMeta `json:"slave"`
Cluster RedisClusterSecret `json:"cluster"`
}
func LoadRedisProfile ¶
func LoadRedisProfileWithFS ¶
func LoadRedisProfileWithFS(name string, fs FileSystem) (*Redis, error)
func (*Redis) MasterAddrs ¶
func (*Redis) SlaveAddrs ¶
type RedisClusterSecret ¶
type RedisProfile ¶
type RedisProfile = Redis
Click to show internal directories.
Click to hide internal directories.