Documentation ¶
Index ¶
- Constants
- func GetDriver(host steniciov1alpha1.SqlHost) (*driverDecorator, error)
- type Driver
- type MySqlDriver
- func (d *MySqlDriver) DeleteDatabase(ctx context.Context, database steniciov1alpha1.SqlDatabase) error
- func (d *MySqlDriver) DeleteGrants(ctx context.Context, grants steniciov1alpha1.SqlGrant, ...) error
- func (d *MySqlDriver) DeleteOwnerState(ctx context.Context, data OwnerShipData) error
- func (d *MySqlDriver) DeleteUser(ctx context.Context, user steniciov1alpha1.SqlUser) error
- func (d *MySqlDriver) GetOwnerState(ctx context.Context, data OwnerShipData) (OwnerState, error)
- func (d *MySqlDriver) InitOwnerSchema(ctx context.Context) error
- func (d *MySqlDriver) SetOwnerState(ctx context.Context, data OwnerShipData) error
- func (d *MySqlDriver) UpsertDatabase(ctx context.Context, database steniciov1alpha1.SqlDatabase) (int64, error)
- func (d *MySqlDriver) UpsertGrants(ctx context.Context, grants steniciov1alpha1.SqlGrant, ...) (int64, error)
- func (d *MySqlDriver) UpsertUser(ctx context.Context, user steniciov1alpha1.SqlUser) (int64, error)
- type OwnerShipData
- type OwnerShipType
- type OwnerState
Constants ¶
View Source
const ( IsOwner OwnerState = "IsOwner" NotOwner OwnerState = "NotOwner" NonExisting OwnerState = "NonExisting" OwnerShipTypeDatabase OwnerShipType = "OwnerShipTypeDatabase" OwnerShipTypeUser OwnerShipType = "OwnerShipTypeUser" OwnerShipTypeGrant OwnerShipType = "OwnerShipTypeGrant" )
Variables ¶
This section is empty.
Functions ¶
func GetDriver ¶
func GetDriver(host steniciov1alpha1.SqlHost) (*driverDecorator, error)
Types ¶
type Driver ¶
type Driver interface { UpsertUser(context.Context, steniciov1alpha1.SqlUser) (int64, error) DeleteUser(context.Context, steniciov1alpha1.SqlUser) error UpsertDatabase(context.Context, steniciov1alpha1.SqlDatabase) (int64, error) DeleteDatabase(context.Context, steniciov1alpha1.SqlDatabase) error UpsertGrants(context.Context, steniciov1alpha1.SqlGrant, steniciov1alpha1.SqlUser, steniciov1alpha1.SqlDatabase) (int64, error) DeleteGrants(context.Context, steniciov1alpha1.SqlGrant, steniciov1alpha1.SqlUser, steniciov1alpha1.SqlDatabase) error InitOwnerSchema(context.Context) error SetOwnerState(context.Context, OwnerShipData) error DeleteOwnerState(context.Context, OwnerShipData) error GetOwnerState(context.Context, OwnerShipData) (OwnerState, error) }
type MySqlDriver ¶
type MySqlDriver struct {
Host steniciov1alpha1.SqlHost
}
func (*MySqlDriver) DeleteDatabase ¶
func (d *MySqlDriver) DeleteDatabase(ctx context.Context, database steniciov1alpha1.SqlDatabase) error
func (*MySqlDriver) DeleteGrants ¶
func (d *MySqlDriver) DeleteGrants(ctx context.Context, grants steniciov1alpha1.SqlGrant, user steniciov1alpha1.SqlUser, database steniciov1alpha1.SqlDatabase) error
func (*MySqlDriver) DeleteOwnerState ¶ added in v1.13.0
func (d *MySqlDriver) DeleteOwnerState(ctx context.Context, data OwnerShipData) error
func (*MySqlDriver) DeleteUser ¶
func (d *MySqlDriver) DeleteUser(ctx context.Context, user steniciov1alpha1.SqlUser) error
func (*MySqlDriver) GetOwnerState ¶ added in v1.13.0
func (d *MySqlDriver) GetOwnerState(ctx context.Context, data OwnerShipData) (OwnerState, error)
func (*MySqlDriver) InitOwnerSchema ¶ added in v1.13.0
func (d *MySqlDriver) InitOwnerSchema(ctx context.Context) error
func (*MySqlDriver) SetOwnerState ¶ added in v1.13.0
func (d *MySqlDriver) SetOwnerState(ctx context.Context, data OwnerShipData) error
func (*MySqlDriver) UpsertDatabase ¶
func (d *MySqlDriver) UpsertDatabase(ctx context.Context, database steniciov1alpha1.SqlDatabase) (int64, error)
func (*MySqlDriver) UpsertGrants ¶
func (d *MySqlDriver) UpsertGrants(ctx context.Context, grants steniciov1alpha1.SqlGrant, user steniciov1alpha1.SqlUser, database steniciov1alpha1.SqlDatabase) (int64, error)
func (*MySqlDriver) UpsertUser ¶
func (d *MySqlDriver) UpsertUser(ctx context.Context, user steniciov1alpha1.SqlUser) (int64, error)
type OwnerShipData ¶ added in v1.13.0
type OwnerShipData struct { Type OwnerShipType Name string Resource string OwnerID steniciov1alpha1.OwnerID }
type OwnerShipType ¶ added in v1.13.0
type OwnerShipType string
type OwnerState ¶ added in v1.13.0
type OwnerState string
Click to show internal directories.
Click to hide internal directories.