acquia

package
v0.0.0-...-3650348 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2014 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcquiaServerState

type AcquiaServerState struct {
	*http.Server  `json:"-"`
	Subscriptions []*Subscription `json:"subscriptions"`
	Tasks         TaskList        `json:"tasks"`
	Users         []*User         `json:"users"`
}

func NewServerInstance

func NewServerInstance(subname string) *AcquiaServerState

Creates a new AcquiaServerState, which acts as the basis for a mock API endpoint.

func (*AcquiaServerState) Router

func (ss *AcquiaServerState) Router() *mux.Router

func (*AcquiaServerState) Serve

func (ss *AcquiaServerState) Serve(l net.Listener)

Starts up and serves an httpd of this API server, binding to the provided address.

This function blocks; it should typically be called in a goroutine.

func (*AcquiaServerState) Version

func (ss *AcquiaServerState) Version() string

type Database

type Database struct {
	Name string
}

type Environment

type Environment struct {
	Name        string   `json:"name"`
	Domains     []string `json:"domains"`
	CodeVersion string   `json:"vcs_path"`
}

type Subscription

type Subscription struct {
	Name         string         `json:"name"`
	Environments []*Environment `json:"environments"`
	Databases    []*Database    `json:"databases"`
	Users        []*User        `json:"users"`
}

func NewSubscription

func NewSubscription(name string) *Subscription

type Task

type Task struct {
	Id          int    `json:"name"`
	Created     int    `json:"created"`
	Started     int    `json:"started"`
	Description string `json:"description"`
	Completed   bool   `json:"completed"`
	Logs        string `json:"logs"`
	Queue       string `json:"queue"`
	Result      string `json:"result"`
	Sender      string `json:"sender"`
	State       int    `json:"state"`
}

type TaskList

type TaskList []*Task

func (TaskList) AddTask

func (tl TaskList) AddTask() *Task

type User

type User struct {
	Name     string
	Email    string
	Password string
	Key      string
}

Jump to

Keyboard shortcuts

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