roleutil

package
v0.258.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 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