Help us shape the future of Go! Take the 2026 Go Developer Survey

roleutil

package
v0.312.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Organization   string
	Database       string
	Branch         string
	Name           string
	TTL            time.Duration
	InheritedRoles []string
}

Options represents the options to create a new Postgres role

type Role

type Role struct {
	Role *ps.PostgresRole
	// contains filtered or unexported fields
}

Role represents a Postgres role with cleanup capabilities

func New

func New(ctx context.Context, client *ps.Client, opts Options) (*Role, error)

New creates a new temporary Postgres role

func (*Role) Cleanup

func (r *Role) Cleanup(ctx context.Context, successor string) error

Cleanup deletes the temporary role with an optional successor

Jump to

Keyboard shortcuts

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