sandbox

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database represents a the PostgreSQL database.

func (*Database) Destroy

func (d *Database) Destroy() error

Destroy deletes the database and the user associated to this database.

func (*Database) Source

func (d *Database) Source() string

Source returns the database connection string.

type Sandbox

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

Sandbox is the implementation of the sandbox.

func (*Sandbox) Database

func (s *Sandbox) Database() (database *Database, err error)

Database creates a new user and database in the PostgreSQL server of the sandbox and returns an object that can be used to interact with it.

func (*Sandbox) Destroy

func (s *Sandbox) Destroy() error

Destroy destroys the sandbox and all the associated resources.

func (*Sandbox) Project

func (s *Sandbox) Project() string

Project returns the name of the OpenShift project.

type SandboxBuilder

type SandboxBuilder struct {
}

SandboxBuilder is an object that contains the data and the logic needed to build a sandbox environment. Do not create instances of this type directly, use the NewSandbox function instead.

func NewSandbox

func NewSandbox() *SandboxBuilder

NewSandbox creates a new builder that knows how to create a sandbox. The sandbox will be created when eventually calling the Build method. The builder can be used multiple times to create multiple sandboxes.

func (*SandboxBuilder) Build

func (b *SandboxBuilder) Build() (s *Sandbox, err error)

Build uses the information stored inside the builder to create a new sandbox.

Jump to

Keyboard shortcuts

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