mvcc

package module
v0.0.0-...-13e8ad2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mvcc

tests for the minimum viable cloud controller

See texts directory for some philosophy

Documentation

Index

Constants

View Source
const (
	// By default, retry every 200ms for up to 1m
	DefaultDialRetries  = 100
	DefaultDialInterval = 200 * time.Millisecond

	DefaultHost = "localhost"
)

Variables

View Source
var (
	ErrFailedToStart              = errors.New("failed to start")
	ErrCCBinaryPathNotSet         = errors.New("the filepath to the CC binary must be set")
	ErrCCConfigPathNotSet         = errors.New("the filepath to the CC config file must be set")
	ErrPermServerBinaryPathNotSet = errors.New("the filepath to the perm binary must be set")
	ErrPermServerCertsPathNotSet  = errors.New("the filepath to the perm TLS certificates must be set")

	ErrBadRequest          = errors.New("bad request")
	ErrUnauthenticated     = errors.New("unauthenticated")
	ErrForbidden           = errors.New("forbidden")
	ErrNotFound            = errors.New("not found")
	ErrUnprocessableEntity = errors.New("unprocessable entity")

	ErrInternalServer = errors.New("internal server error")
	ErrBadGateway     = errors.New("bad gateway")
)

Functions

func RandomUUID

func RandomUUID(prefix string) string

Types

type App

type App struct {
	Name string
	UUID string
}

type BBSOptions

type BBSOptions struct {
	Port int
}

type Build

type Build struct {
	UUID        string
	State       string
	DropletUUID string
}

type DialMVCCOption

type DialMVCCOption func(*dialMVCCOpts)

func WithBBSOptions

func WithBBSOptions(options BBSOptions) DialMVCCOption

func WithDialRetries

func WithDialRetries(retries int) DialMVCCOption

func WithDialRetryInterval

func WithDialRetryInterval(interval time.Duration) DialMVCCOption

func WithPermOptions

func WithPermOptions(options PermOptions) DialMVCCOption

func WithPort

func WithPort(port int) DialMVCCOption

func WithUAAOptions

func WithUAAOptions(options UAAOptions) DialMVCCOption

type ErrUnexpectedStatusCode

type ErrUnexpectedStatusCode struct {
	StatusCode int
}

func (*ErrUnexpectedStatusCode) Error

func (e *ErrUnexpectedStatusCode) Error() string

type MVCC

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

func DialMVCC

func DialMVCC(dialOptions ...DialMVCCOption) (*MVCC, error)

func (*MVCC) Delete

func (cc *MVCC) Delete(path string, authToken string) (*http.Response, error)

func (*MVCC) Do

func (cc *MVCC) Do(verb string, path string, authToken string, body interface{}, respData interface{}) (*http.Response, error)

func (*MVCC) Get

func (cc *MVCC) Get(path string, authToken string, respData interface{}) (*http.Response, error)

func (*MVCC) Kill

func (cc *MVCC) Kill() error

func (*MVCC) Post

func (cc *MVCC) Post(path string, authToken string, body interface{}, respData interface{}) (*http.Response, error)

func (*MVCC) Put

func (cc *MVCC) Put(path string, authToken string, body interface{}, respData interface{}) (*http.Response, error)

func (*MVCC) V2DeleteOrganization

func (cc *MVCC) V2DeleteOrganization(authToken, uuid string) error

func (*MVCC) V2SetFeatureFlag

func (cc *MVCC) V2SetFeatureFlag(authToken string, flag string, enabled bool) error

func (*MVCC) V3CreateApp

func (cc *MVCC) V3CreateApp(authToken string, parentSpace Space) (App, error)

func (*MVCC) V3CreateBuild

func (cc *MVCC) V3CreateBuild(authToken string, parentPackage Package) (Build, error)

func (*MVCC) V3CreateOrganization

func (cc *MVCC) V3CreateOrganization(authToken string) (Organization, error)

func (*MVCC) V3CreatePackage

func (cc *MVCC) V3CreatePackage(authToken string, parentApp App) (Package, error)

func (*MVCC) V3CreateSpace

func (cc *MVCC) V3CreateSpace(authToken string, parentOrg Organization) (Space, error)

func (*MVCC) V3CreateTask

func (cc *MVCC) V3CreateTask(authToken string, parentApp App, dropletUUID string) (Task, error)

func (*MVCC) V3GetBuild

func (cc *MVCC) V3GetBuild(authToken string, uuid string) (Build, error)

func (*MVCC) V3GetPackage

func (cc *MVCC) V3GetPackage(authToken string, uuid string) (Package, error)

func (*MVCC) V3GetTask

func (cc *MVCC) V3GetTask(authToken string, taskUUID string) (Task, error)

func (*MVCC) V3ListTasks

func (cc *MVCC) V3ListTasks(authToken string) ([]Task, error)

type Organization

type Organization struct {
	Name string
	UUID string
}

type Package

type Package struct {
	UUID  string
	Type  PackageType
	State string
}

type PackageType

type PackageType string
const (
	BitsType   PackageType = "bits"
	DockerType PackageType = "docker"
)

type PermOptions

type PermOptions struct {
	Port       int
	CACertPath string
}

type Space

type Space struct {
	Name string
	UUID string
}

type Task

type Task struct {
	UUID string
}

type UAAOptions

type UAAOptions struct {
	Port int
}

type User

type User struct {
	UUID        string
	AccessToken string
}

type V2OrganizationRequest

type V2OrganizationRequest struct {
	Status string `json:"status"`
}

type V2OrganizationResponse

type V2OrganizationResponse struct {
	Metadata struct {
		GUID string `json:"guid"`
	} `json:"metadata"`
	Entity struct {
		Status string `json:"status"`
	} `json:"entity"`
}

type V2SpaceRequest

type V2SpaceRequest struct {
	Name             string `json:"name"`
	OrganizationGUID string `json:"organization_guid"`
}

type V2SpaceResponse

type V2SpaceResponse struct {
	Metadata struct {
		GUID string `json:"guid"`
	} `json:"metadata"`
	Entity struct {
		Name string `json:"name"`
	} `json:"entity"`
}

type V3Error

type V3Error struct {
	Code   int    `json:"code"`
	Title  string `json:"title"`
	Detail string `json:"detail"`
}

type V3ErrorResponse

type V3ErrorResponse struct {
	Errors []V3Error `json:"errors"`
}

Directories

Path Synopsis
main command
internal
uaa command

Jump to

Keyboard shortcuts

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