Documentation ¶
Index ¶
- func New() (interface{}, error)
- func Run(apiTLSConfig *api.TLSConfig) error
- type PostgreSQL
- func (p *PostgreSQL) CreateUser(ctx context.Context, statements dbplugin.Statements, ...) (username string, password string, err error)
- func (p *PostgreSQL) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, ...) error
- func (p *PostgreSQL) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
- func (p *PostgreSQL) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)
- func (p *PostgreSQL) SetCredentials(ctx context.Context, statements dbplugin.Statements, ...) (username, password string, err error)
- func (p *PostgreSQL) Type() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PostgreSQL ¶
type PostgreSQL struct { *connutil.SQLConnectionProducer credsutil.CredentialsProducer }
func (*PostgreSQL) CreateUser ¶
func (p *PostgreSQL) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, expiration time.Time) (username string, password string, err error)
func (*PostgreSQL) RenewUser ¶
func (p *PostgreSQL) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, expiration time.Time) error
func (*PostgreSQL) RevokeUser ¶
func (p *PostgreSQL) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
func (*PostgreSQL) RotateRootCredentials ¶ added in v0.10.0
func (*PostgreSQL) SetCredentials ¶ added in v1.2.0
func (p *PostgreSQL) SetCredentials(ctx context.Context, statements dbplugin.Statements, staticUser dbplugin.StaticUserConfig) (username, password string, err error)
SetCredentials uses provided information to set/create a user in the database. Unlike CreateUser, this method requires a username be provided and uses the name given, instead of generating a name. This is used for creating and setting the password of static accounts, as well as rolling back passwords in the database in the event an updated database fails to save in Vault's storage.
func (*PostgreSQL) Type ¶
func (p *PostgreSQL) Type() (string, error)
Click to show internal directories.
Click to hide internal directories.