Documentation ¶
Index ¶
- Constants
- func GetDatabasePath(c appcat_cs.AppcatalogV1alpha1Interface, ref appcat.AppReference) (string, error)
- type DatabaseCredentialManager
- type DatabaseRole
- type DatabaseRoleInterface
- func NewDatabaseRoleForMongodb(kClient kubernetes.Interface, appClient appcat_cs.AppcatalogV1alpha1Interface, ...) (DatabaseRoleInterface, error)
- func NewDatabaseRoleForMysql(kClient kubernetes.Interface, appClient appcat_cs.AppcatalogV1alpha1Interface, ...) (DatabaseRoleInterface, error)
- func NewDatabaseRoleForPostgres(kClient kubernetes.Interface, appClient appcat_cs.AppcatalogV1alpha1Interface, ...) (DatabaseRoleInterface, error)
Constants ¶
View Source
const (
DefaultDatabasePath = "database"
)
Variables ¶
This section is empty.
Functions ¶
func GetDatabasePath ¶
func GetDatabasePath(c appcat_cs.AppcatalogV1alpha1Interface, ref appcat.AppReference) (string, error)
If database path does not exist, then use default database path
Types ¶
type DatabaseCredentialManager ¶
type DatabaseCredentialManager interface { // Gets credential from vault GetCredential() (*vaultapi.Secret, error) // Creates a kubernetes secret containing postgres credential CreateSecret(name string, namespace string, credential *vaultapi.Secret) error // Creates kubernetes role CreateRole(name string, namespace string, secretName string) error // Creates kubernetes role binding CreateRoleBinding(name string, namespace string, roleName string, subjects []rbacv1.Subject) error IsLeaseExpired(leaseID string) (bool, error) RevokeLease(leaseID string) error }
type DatabaseRole ¶
type DatabaseRole struct { role.RoleInterface // contains filtered or unexported fields }
func (*DatabaseRole) DeleteRole ¶
func (d *DatabaseRole) DeleteRole(name string) error
https://www.vaultproject.io/api/secret/databases/index.html#delete-role
DeleteRole deletes role It's safe to call multiple time. It doesn't give error even if respective role doesn't exist
func (*DatabaseRole) EnableDatabase ¶
func (d *DatabaseRole) EnableDatabase() error
EnableDatabase enables database secret engine It first checks whether database is enabled or not
func (*DatabaseRole) IsDatabaseEnabled ¶
func (d *DatabaseRole) IsDatabaseEnabled() (bool, error)
IsDatabaseEnabled checks whether database is enabled or not
type DatabaseRoleInterface ¶
type DatabaseRoleInterface interface { role.RoleInterface // EnableDatabase enables database secret engine EnableDatabase() error // IsDatabaseEnabled checks whether database is enabled or not IsDatabaseEnabled() (bool, error) // DeleteRole deletes role DeleteRole(name string) error }
func NewDatabaseRoleForMongodb ¶
func NewDatabaseRoleForMongodb(kClient kubernetes.Interface, appClient appcat_cs.AppcatalogV1alpha1Interface, role *api.MongoDBRole) (DatabaseRoleInterface, error)
func NewDatabaseRoleForMysql ¶
func NewDatabaseRoleForMysql(kClient kubernetes.Interface, appClient appcat_cs.AppcatalogV1alpha1Interface, role *api.MySQLRole) (DatabaseRoleInterface, error)
func NewDatabaseRoleForPostgres ¶
func NewDatabaseRoleForPostgres(kClient kubernetes.Interface, appClient appcat_cs.AppcatalogV1alpha1Interface, role *api.PostgresRole) (DatabaseRoleInterface, error)
Click to show internal directories.
Click to hide internal directories.