Documentation ¶
Overview ¶
Package cassandra contains ...
Package cassandra contains ...
Package cassandra contains ...
Package cassandra contains ...
Index ¶
- func Create(log logging.Logger) error
- type CassandraStore
- func (c *CassandraStore) Close()
- func (c *CassandraStore) Connect(dbAddrs []string, dbAdminUsername string, dbAdminPassword string) (err error)
- func (c *CassandraStore) CreateDb(dbName string, replicationFactor string) (err error)
- func (c *CassandraStore) CreateDbUser(serviceUsername string, servicePassword string) (err error)
- func (c *CassandraStore) CreateLockSchemaDb(replicationFactor string) (err error)
- func (c *CassandraStore) GrantPermission(serviceUsername string, dbName string) (err error)
- type DBConfig
- type DbConfigurator
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CassandraStore ¶
type CassandraStore struct {
// contains filtered or unexported fields
}
func NewCassandraStore ¶
func NewCassandraStore(logger logging.Logger, sess *gocql.Session) (store *CassandraStore)
func (*CassandraStore) Close ¶
func (c *CassandraStore) Close()
func (*CassandraStore) Connect ¶
func (c *CassandraStore) Connect(dbAddrs []string, dbAdminUsername string, dbAdminPassword string) (err error)
func (*CassandraStore) CreateDb ¶
func (c *CassandraStore) CreateDb(dbName string, replicationFactor string) (err error)
func (*CassandraStore) CreateDbUser ¶
func (c *CassandraStore) CreateDbUser(serviceUsername string, servicePassword string) (err error)
func (*CassandraStore) CreateLockSchemaDb ¶
func (c *CassandraStore) CreateLockSchemaDb(replicationFactor string) (err error)
func (*CassandraStore) GrantPermission ¶
func (c *CassandraStore) GrantPermission(serviceUsername string, dbName string) (err error)
type DBConfig ¶
type DBConfig struct { DbAddresses []string `envconfig:"DB_ADDRESSES" required:"true"` DbAdminUsername string `envconfig:"DB_ADMIN_USERNAME" required:"true"` DbServiceUsername string `envconfig:"DB_SERVICE_USERNAME" required:"true"` DbName string `envconfig:"CASSANDRA_DB_NAME" required:"true"` DbReplicationFactor string `envconfig:"DB_REPLICATION_FACTOR" required:"true"` DbAdminPassword string `envconfig:"DB_ADMIN_PASSWD" required:"true"` DbServicePassword string `envconfig:"DB_SERVICE_PASSWD" required:"true"` }
type DbConfigurator ¶
type DbConfigurator struct {
// contains filtered or unexported fields
}
func NewDbConfigurator ¶
func NewDbConfigurator(logger logging.Logger, stor Store) (handler *DbConfigurator)
func (*DbConfigurator) ConfigureDb ¶
func (dbConf *DbConfigurator) ConfigureDb(conf DBConfig) (err error)
type Store ¶
type Store interface { Connect(dbAddrs []string, dbAdminUsername string, dbAdminPassword string) (err error) Close() CreateDbUser(serviceUsername string, servicePassword string) (err error) GrantPermission(serviceUsername string, dbName string) (err error) CreateDb(dbName string, replicationFactor string) (err error) CreateLockSchemaDb(replicationFactor string) (err error) }
Click to show internal directories.
Click to hide internal directories.