redshift

package
v1.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: MPL-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(lowercaseUsername bool) func() (interface{}, error)

lowercaseUsername is the reason we wrote this plugin. Redshift implements (mostly) a postgres 8 interface, and part of that is under the hood, it's lowercasing the usernames.

func Run

func Run(apiTLSConfig *api.TLSConfig) error

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

Types

type RedShift

func (*RedShift) CreateUser

func (r *RedShift) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, expiration time.Time) (username string, password string, err error)

func (*RedShift) RenewUser

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

func (*RedShift) RevokeUser

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

func (*RedShift) RotateRootCredentials

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

func (*RedShift) SetCredentials

func (r *RedShift) 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 (*RedShift) Type

func (r *RedShift) Type() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL