Documentation ¶
Index ¶
- Constants
- func Backend(conf *logical.BackendConfig) *databaseBackend
- func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)
- func New() (interface{}, error)
- func NewV4() (interface{}, error)
- func RunV4(apiTLSConfig *api.TLSConfig) error
- func RunV5() error
- type DatabaseConfig
- type MockDatabaseV4
- func (m MockDatabaseV4) Close() error
- func (m MockDatabaseV4) CreateUser(ctx context.Context, statements v4.Statements, ...) (username string, password string, err error)
- func (m MockDatabaseV4) GenerateCredentials(ctx context.Context) (password string, err error)
- func (m MockDatabaseV4) Init(ctx context.Context, config map[string]interface{}, verifyConnection bool) (saveConfig map[string]interface{}, err error)
- func (m MockDatabaseV4) Initialize(ctx context.Context, config map[string]interface{}, verifyConnection bool) (err error)
- func (m MockDatabaseV4) RenewUser(ctx context.Context, statements v4.Statements, username string, ...) error
- func (m MockDatabaseV4) RevokeUser(ctx context.Context, statements v4.Statements, username string) error
- func (m MockDatabaseV4) RotateRootCredentials(ctx context.Context, statements []string) (config map[string]interface{}, err error)
- func (m MockDatabaseV4) SetCredentials(ctx context.Context, statements v4.Statements, ...) (username string, password string, err error)
- func (m MockDatabaseV4) Type() (string, error)
- type MockDatabaseV5
- func (m MockDatabaseV5) Close() error
- func (m MockDatabaseV5) DeleteUser(ctx context.Context, req v5.DeleteUserRequest) (v5.DeleteUserResponse, error)
- func (m MockDatabaseV5) Initialize(ctx context.Context, req v5.InitializeRequest) (v5.InitializeResponse, error)
- func (m MockDatabaseV5) NewUser(ctx context.Context, req v5.NewUserRequest) (v5.NewUserResponse, error)
- func (m MockDatabaseV5) Type() (string, error)
- func (m MockDatabaseV5) UpdateUser(ctx context.Context, req v5.UpdateUserRequest) (v5.UpdateUserResponse, error)
Constants ¶
View Source
const SecretCredsType = "creds"
Variables ¶
This section is empty.
Functions ¶
func Backend ¶
func Backend(conf *logical.BackendConfig) *databaseBackend
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct { PluginName string `json:"plugin_name" structs:"plugin_name" mapstructure:"plugin_name"` // ConnectionDetails stores the database specific connection settings needed // by each database type. ConnectionDetails map[string]interface{} `json:"connection_details" structs:"connection_details" mapstructure:"connection_details"` AllowedRoles []string `json:"allowed_roles" structs:"allowed_roles" mapstructure:"allowed_roles"` RootCredentialsRotateStatements []string `` /* 136-byte string literal not displayed */ PasswordPolicy string `json:"password_policy" structs:"password_policy" mapstructure:"password_policy"` }
DatabaseConfig is used by the Factory function to configure a Database object.
type MockDatabaseV4 ¶ added in v1.6.0
type MockDatabaseV4 struct {
// contains filtered or unexported fields
}
MockDatabaseV4 is an implementation of Database interface
func (MockDatabaseV4) Close ¶ added in v1.6.0
func (m MockDatabaseV4) Close() error
func (MockDatabaseV4) CreateUser ¶ added in v1.6.0
func (m MockDatabaseV4) CreateUser(ctx context.Context, statements v4.Statements, usernameConfig v4.UsernameConfig, expiration time.Time) (username string, password string, err error)
func (MockDatabaseV4) GenerateCredentials ¶ added in v1.6.0
func (m MockDatabaseV4) GenerateCredentials(ctx context.Context) (password string, err error)
func (MockDatabaseV4) Initialize ¶ added in v1.6.0
func (MockDatabaseV4) RenewUser ¶ added in v1.6.0
func (m MockDatabaseV4) RenewUser(ctx context.Context, statements v4.Statements, username string, expiration time.Time) error
func (MockDatabaseV4) RevokeUser ¶ added in v1.6.0
func (m MockDatabaseV4) RevokeUser(ctx context.Context, statements v4.Statements, username string) error
func (MockDatabaseV4) RotateRootCredentials ¶ added in v1.6.0
func (MockDatabaseV4) SetCredentials ¶ added in v1.6.0
func (m MockDatabaseV4) SetCredentials(ctx context.Context, statements v4.Statements, staticConfig v4.StaticUserConfig) (username string, password string, err error)
func (MockDatabaseV4) Type ¶ added in v1.6.0
func (m MockDatabaseV4) Type() (string, error)
type MockDatabaseV5 ¶ added in v1.6.0
type MockDatabaseV5 struct {
// contains filtered or unexported fields
}
MockDatabaseV5 is an implementation of Database interface
func (MockDatabaseV5) Close ¶ added in v1.6.0
func (m MockDatabaseV5) Close() error
func (MockDatabaseV5) DeleteUser ¶ added in v1.6.0
func (m MockDatabaseV5) DeleteUser(ctx context.Context, req v5.DeleteUserRequest) (v5.DeleteUserResponse, error)
func (MockDatabaseV5) Initialize ¶ added in v1.6.0
func (m MockDatabaseV5) Initialize(ctx context.Context, req v5.InitializeRequest) (v5.InitializeResponse, error)
func (MockDatabaseV5) NewUser ¶ added in v1.6.0
func (m MockDatabaseV5) NewUser(ctx context.Context, req v5.NewUserRequest) (v5.NewUserResponse, error)
func (MockDatabaseV5) Type ¶ added in v1.6.0
func (m MockDatabaseV5) Type() (string, error)
func (MockDatabaseV5) UpdateUser ¶ added in v1.6.0
func (m MockDatabaseV5) UpdateUser(ctx context.Context, req v5.UpdateUserRequest) (v5.UpdateUserResponse, error)
Click to show internal directories.
Click to hide internal directories.