Documentation ¶
Index ¶
- type Connection
- func NewETCDConnection(config ConnectionConfig) (Connection, error)
- func NewMySQLConnection(config ConnectionConfig) (Connection, error)
- func NewPostgreSQLConnection(config ConnectionConfig) (Connection, error)
- func NewStorageConnection(ctx context.Context, client client.Client, ds kamajiv1alpha1.DataStore) (Connection, error)
- type ConnectionConfig
- type ConnectionEndpoint
- type EtcdClient
- func (e *EtcdClient) Check(ctx context.Context) error
- func (e *EtcdClient) Close() error
- func (e *EtcdClient) CreateDB(context.Context, string) error
- func (e *EtcdClient) CreateUser(ctx context.Context, user, password string) error
- func (e *EtcdClient) DBExists(context.Context, string) (bool, error)
- func (e *EtcdClient) DeleteDB(ctx context.Context, dbName string) error
- func (e *EtcdClient) DeleteUser(ctx context.Context, user string) error
- func (e *EtcdClient) Driver() string
- func (e *EtcdClient) GetConnectionString() string
- func (e *EtcdClient) GrantPrivileges(ctx context.Context, user, dbName string) error
- func (e *EtcdClient) GrantPrivilegesExists(ctx context.Context, username, dbName string) (bool, error)
- func (e *EtcdClient) Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error
- func (e *EtcdClient) RevokePrivileges(ctx context.Context, user, dbName string) error
- func (e *EtcdClient) UserExists(ctx context.Context, user string) (bool, error)
- type MySQLConnection
- func (c *MySQLConnection) Check(ctx context.Context) error
- func (c *MySQLConnection) Close() error
- func (c *MySQLConnection) CreateDB(ctx context.Context, dbName string) error
- func (c *MySQLConnection) CreateUser(ctx context.Context, user, password string) error
- func (c *MySQLConnection) DBExists(ctx context.Context, dbName string) (bool, error)
- func (c *MySQLConnection) DeleteDB(ctx context.Context, dbName string) error
- func (c *MySQLConnection) DeleteUser(ctx context.Context, user string) error
- func (c *MySQLConnection) Driver() string
- func (c *MySQLConnection) GetConnectionString() string
- func (c *MySQLConnection) GrantPrivileges(ctx context.Context, user, dbName string) error
- func (c *MySQLConnection) GrantPrivilegesExists(ctx context.Context, user, dbName string) (bool, error)
- func (c *MySQLConnection) Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error
- func (c *MySQLConnection) RevokePrivileges(ctx context.Context, user, dbName string) error
- func (c *MySQLConnection) UserExists(ctx context.Context, user string) (bool, error)
- type PostgreSQLConnection
- func (r *PostgreSQLConnection) Check(ctx context.Context) error
- func (r *PostgreSQLConnection) Close() error
- func (r *PostgreSQLConnection) CreateDB(ctx context.Context, dbName string) error
- func (r *PostgreSQLConnection) CreateUser(ctx context.Context, user, password string) error
- func (r *PostgreSQLConnection) DBExists(ctx context.Context, dbName string) (bool, error)
- func (r *PostgreSQLConnection) DeleteDB(ctx context.Context, dbName string) error
- func (r *PostgreSQLConnection) DeleteUser(ctx context.Context, user string) error
- func (r *PostgreSQLConnection) Driver() string
- func (r *PostgreSQLConnection) GetConnectionString() string
- func (r *PostgreSQLConnection) GrantPrivileges(ctx context.Context, user, dbName string) error
- func (r *PostgreSQLConnection) GrantPrivilegesExists(ctx context.Context, user, dbName string) (bool, error)
- func (r *PostgreSQLConnection) Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error
- func (r *PostgreSQLConnection) RevokePrivileges(ctx context.Context, user, dbName string) error
- func (r *PostgreSQLConnection) UserExists(ctx context.Context, user string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { CreateUser(ctx context.Context, user, password string) error CreateDB(ctx context.Context, dbName string) error GrantPrivileges(ctx context.Context, user, dbName string) error UserExists(ctx context.Context, user string) (bool, error) DBExists(ctx context.Context, dbName string) (bool, error) GrantPrivilegesExists(ctx context.Context, user, dbName string) (bool, error) DeleteUser(ctx context.Context, user string) error DeleteDB(ctx context.Context, dbName string) error RevokePrivileges(ctx context.Context, user, dbName string) error GetConnectionString() string Close() error Check(ctx context.Context) error Driver() string Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error }
func NewETCDConnection ¶
func NewETCDConnection(config ConnectionConfig) (Connection, error)
func NewMySQLConnection ¶
func NewMySQLConnection(config ConnectionConfig) (Connection, error)
func NewPostgreSQLConnection ¶
func NewPostgreSQLConnection(config ConnectionConfig) (Connection, error)
func NewStorageConnection ¶ added in v0.2.0
func NewStorageConnection(ctx context.Context, client client.Client, ds kamajiv1alpha1.DataStore) (Connection, error)
type ConnectionConfig ¶
type ConnectionConfig struct { User string Password string Endpoints []ConnectionEndpoint DBName string TLSConfig *tls.Config Parameters map[string][]string }
func NewConnectionConfig ¶ added in v0.2.0
func NewConnectionConfig(ctx context.Context, client client.Client, ds kamajiv1alpha1.DataStore) (*ConnectionConfig, error)
type ConnectionEndpoint ¶
func (ConnectionEndpoint) String ¶
func (r ConnectionEndpoint) String() string
type EtcdClient ¶
type EtcdClient struct {
Client etcdclient.Client
}
func (*EtcdClient) Close ¶
func (e *EtcdClient) Close() error
func (*EtcdClient) CreateUser ¶
func (e *EtcdClient) CreateUser(ctx context.Context, user, password string) error
func (*EtcdClient) DeleteDB ¶
func (e *EtcdClient) DeleteDB(ctx context.Context, dbName string) error
func (*EtcdClient) DeleteUser ¶
func (e *EtcdClient) DeleteUser(ctx context.Context, user string) error
func (*EtcdClient) Driver ¶
func (e *EtcdClient) Driver() string
func (*EtcdClient) GetConnectionString ¶
func (e *EtcdClient) GetConnectionString() string
func (*EtcdClient) GrantPrivileges ¶
func (e *EtcdClient) GrantPrivileges(ctx context.Context, user, dbName string) error
func (*EtcdClient) GrantPrivilegesExists ¶
func (*EtcdClient) Migrate ¶ added in v0.2.0
func (e *EtcdClient) Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error
func (*EtcdClient) RevokePrivileges ¶
func (e *EtcdClient) RevokePrivileges(ctx context.Context, user, dbName string) error
func (*EtcdClient) UserExists ¶
type MySQLConnection ¶
type MySQLConnection struct {
// contains filtered or unexported fields
}
func (*MySQLConnection) Close ¶
func (c *MySQLConnection) Close() error
func (*MySQLConnection) CreateDB ¶
func (c *MySQLConnection) CreateDB(ctx context.Context, dbName string) error
func (*MySQLConnection) CreateUser ¶
func (c *MySQLConnection) CreateUser(ctx context.Context, user, password string) error
func (*MySQLConnection) DeleteDB ¶
func (c *MySQLConnection) DeleteDB(ctx context.Context, dbName string) error
func (*MySQLConnection) DeleteUser ¶
func (c *MySQLConnection) DeleteUser(ctx context.Context, user string) error
func (*MySQLConnection) Driver ¶
func (c *MySQLConnection) Driver() string
func (*MySQLConnection) GetConnectionString ¶
func (c *MySQLConnection) GetConnectionString() string
func (*MySQLConnection) GrantPrivileges ¶
func (c *MySQLConnection) GrantPrivileges(ctx context.Context, user, dbName string) error
func (*MySQLConnection) GrantPrivilegesExists ¶
func (*MySQLConnection) Migrate ¶ added in v0.2.0
func (c *MySQLConnection) Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error
func (*MySQLConnection) RevokePrivileges ¶
func (c *MySQLConnection) RevokePrivileges(ctx context.Context, user, dbName string) error
func (*MySQLConnection) UserExists ¶
type PostgreSQLConnection ¶
type PostgreSQLConnection struct {
// contains filtered or unexported fields
}
func (*PostgreSQLConnection) Check ¶
func (r *PostgreSQLConnection) Check(ctx context.Context) error
func (*PostgreSQLConnection) Close ¶
func (r *PostgreSQLConnection) Close() error
func (*PostgreSQLConnection) CreateDB ¶
func (r *PostgreSQLConnection) CreateDB(ctx context.Context, dbName string) error
func (*PostgreSQLConnection) CreateUser ¶
func (r *PostgreSQLConnection) CreateUser(ctx context.Context, user, password string) error
func (*PostgreSQLConnection) DeleteDB ¶
func (r *PostgreSQLConnection) DeleteDB(ctx context.Context, dbName string) error
func (*PostgreSQLConnection) DeleteUser ¶
func (r *PostgreSQLConnection) DeleteUser(ctx context.Context, user string) error
func (*PostgreSQLConnection) Driver ¶
func (r *PostgreSQLConnection) Driver() string
func (*PostgreSQLConnection) GetConnectionString ¶
func (r *PostgreSQLConnection) GetConnectionString() string
func (*PostgreSQLConnection) GrantPrivileges ¶
func (r *PostgreSQLConnection) GrantPrivileges(ctx context.Context, user, dbName string) error
func (*PostgreSQLConnection) GrantPrivilegesExists ¶
func (*PostgreSQLConnection) Migrate ¶ added in v0.2.0
func (r *PostgreSQLConnection) Migrate(ctx context.Context, tcp kamajiv1alpha1.TenantControlPlane, target Connection) error
func (*PostgreSQLConnection) RevokePrivileges ¶
func (r *PostgreSQLConnection) RevokePrivileges(ctx context.Context, user, dbName string) error
func (*PostgreSQLConnection) UserExists ¶
Click to show internal directories.
Click to hide internal directories.