pgp

package
v0.0.0-...-ce6c3d4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	DBName   string `json:"dbname"`
	Username string `json:"username"`
	Password string `json:"password"`
	Host     string `json:"host"`
	Port     string `json:"port"`
	Url      string `json:"url"`
}

Credentials contains all information that is needed to connect to created databases

type PGP

type PGP struct {
	// contains filtered or unexported fields
}

PGP is a postgresql manipulation entity implementation

func New

func New(source string) (*PGP, error)

New creates a new PGP entity

func (*PGP) CreateDB

func (b *PGP) CreateDB(ctx context.Context, d string) (string, error)

CreateDB creates the named database

func (*PGP) CreateUser

func (b *PGP) CreateUser(ctx context.Context, d, u string) (*Credentials, error)

CreateUser creates a user for the named database

func (*PGP) DropDB

func (b *PGP) DropDB(ctx context.Context, d string) error

DropDB deletes the named database

func (*PGP) DropUser

func (b *PGP) DropUser(ctx context.Context, d, u string) error

DropUser removes the named user

Jump to

Keyboard shortcuts

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