vault: Index | Files | Directories

package postgresql

import ""


Package Files


func New Uses

func New() (interface{}, error)

New implements builtinplugins.BuiltinFactory

func Run Uses

func Run(apiTLSConfig *api.TLSConfig) error

Run instantiates a PostgreSQL object, and runs the RPC server for the plugin

type PostgreSQL Uses

type PostgreSQL struct {

func (*PostgreSQL) CreateUser Uses

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 Uses

func (p *PostgreSQL) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, expiration time.Time) error

func (*PostgreSQL) RevokeUser Uses

func (p *PostgreSQL) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error

func (*PostgreSQL) RotateRootCredentials Uses

func (p *PostgreSQL) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)

func (*PostgreSQL) SetCredentials Uses

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 Uses

func (p *PostgreSQL) Type() (string, error)



Package postgresql imports 15 packages (graph) and is imported by 6 packages. Updated 2019-07-21. Refresh now. Tools for package owners.