tutum

package
v0.19.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Time allowed to write a message to the peer.
	WRITE_WAIT = 5 * time.Second
	// Time allowed to read the next pong message from the peer.
	PONG_WAIT = 10 * time.Second
	// Send pings to client with this period. Must be less than PONG_WAIT.
	PING_PERIOD = PONG_WAIT / 2
)

Variables

View Source
var (
	User       string
	ApiKey     string
	AuthHeader string
	BaseUrl    = "https://dashboard.tutum.co/api/v1/"
	StreamUrl  = "wss://stream.tutum.co:443/v1/"
)

Functions

func FetchByResourceUri

func FetchByResourceUri(id string) interface{}

func IsAuthenticated

func IsAuthenticated() bool

func LoadAuth

func LoadAuth() error

func MockupResponse

func MockupResponse(response_file string) (string, error)

func MockupResponse Argument : endpoint Returns : the corresponding JSON response file

func SetBaseUrl added in v0.16.19

func SetBaseUrl() string

func SetUserAgent added in v0.16.0

func SetUserAgent(name string) string

func TutumCall

func TutumCall(url string, requestType string, requestBody []byte) ([]byte, error)

func TutumEvents

func TutumEvents(c chan Event, e chan error)

Types

type AZ added in v0.16.0

type AZ struct {
	Available    bool   `json:"available"`
	Name         string `json:"name"`
	Resource_uri string `json:"resource_uri"`
}

func GetAZ added in v0.16.0

func GetAZ(az string) (AZ, error)

type AZListResponse added in v0.16.0

type AZListResponse struct {
	Meta    Meta `json:"meta"`
	Objects []AZ `json:"objects"`
}

func ListAZ added in v0.16.0

func ListAZ() (AZListResponse, error)

type Action

type Action struct {
	Action       string `json:"action"`
	Body         string `json:"body"`
	End_date     string `json:"end_date"`
	Ip           string `json:"ip"`
	Location     string `json:"location"`
	Logs         string `json:"logs"`
	Method       string `json:"method"`
	Object       string `json:"object"`
	Path         string `json:"path"`
	Resource_uri string `json:"resource_uri"`
	Start_date   string `json:"start_date"`
	State        string `json:"state"`
	Uuid         string `json:"uuid"`
}

func GetAction

func GetAction(uuid string) (Action, error)

func GetAction Argument : uuid Returns : Action JSON object

func (*Action) Cancel added in v0.17.28

func (self *Action) Cancel() (Action, error)

func (*Action) GetLogs added in v0.16.0

func (self *Action) GetLogs(c chan Logs)

func (*Action) Retry added in v0.17.28

func (self *Action) Retry() (Action, error)

type ActionListResponse

type ActionListResponse struct {
	Meta    Meta     `json:"meta"`
	Objects []Action `json:"objects"`
}

func ListActions

func ListActions() (ActionListResponse, error)

func ListActions Returns : Array of Action objects

type Auth

type Auth struct {
	User   string
	Apikey string
}

type BuildSettings added in v0.16.19

type BuildSettings struct {
	Autobuild    bool   `json:"autobuild,omitempty"`
	Branch       string `json:"branch"`
	Dockerfile   string `json:"dockerfile"`
	Image        string `json:"image"`
	Resource_uri string `json:"resource_uri"`
	State        string `json:"state"`
	Tag          string `json:"tag"`
}

func GetImageBuildSetting added in v0.18.0

func GetImageBuildSetting(name string, tag string) (BuildSettings, error)

func (*BuildSettings) Build added in v0.18.0

func (self *BuildSettings) Build() (BuildSettings, error)

type BuildSource added in v0.16.19

type BuildSource struct {
	Autotest       string   `json:"autotest,omitempty"`
	Build_Settings []string `json:"build_settings,omitempty"`
	Owner          string   `json:"owner,omitempty"`
	Repository     string   `json:"repository,omitempty"`
	Type           string   `json:"type,omitempty"`
}

type CListResponse

type CListResponse struct {
	Meta    Meta        `json:"meta"`
	Objects []Container `json:"objects"`
}

func ListContainers

func ListContainers() (CListResponse, error)

func ListContainers Returns : Array of Container objects

type Container

type Container struct {
	Autodestroy         string              `json:"autodestroy"`
	Autorestart         string              `json:"autorestart"`
	Bindings            []ContainerBinding  `json:"bindings"`
	Container_envvars   []ContainerEnvvar   `json:"container_envvars"`
	Container_ports     []ContainerPortInfo `json:"container_ports"`
	Cpu_shares          int                 `json:"cpu_shares"`
	Deployed_datetime   string              `json:"deployed_datetime"`
	Destroyed_datetime  string              `json:"destroyed_datetime"`
	Entrypoint          string              `json:"entrypoint"`
	Exit_code           int                 `json:"exit_code"`
	Exit_code_message   string              `json:"exit_code_message"`
	Image_name          string              `json:"image_name"`
	Image_tag           string              `json:"image_tag"`
	Last_metric         Metric              `json:"last_metric"`
	Link_variables      map[string]string   `json:"link_variables"`
	Linked_to_container []ContainerLinkInfo `json:"linked_to_container"`
	Memory              int                 `json:"memory"`
	Name                string              `json:"name"`
	Net                 string              `json:"net"`
	Node                string              `json:"node"`
	Pid                 string              `json:"pid"`
	Private_ip          string              `json:"private_ip"`
	Privileged          bool                `json:"privileged"`
	Public_dns          string              `json:"public_dns"`
	Resource_uri        string              `json:"resource_uri"`
	Roles               []string            `json:"roles"`
	Run_command         string              `json:"run_command"`
	Service             string              `json:"service"`
	Started_datetime    string              `json:"started_datetime"`
	State               string              `json:"state"`
	Stopped_datetime    string              `json:"stopped_datetime"`
	Synchronized        bool                `json:"synchronized"`
	Uuid                string              `json:"uuid"`
	Working_dir         string              `json:"working_dir"`
}

func GetContainer

func GetContainer(uuid string) (Container, error)

func GetContainer Argument : uuid Returns : Container JSON object

func (*Container) Exec

func (self *Container) Exec(command string, c chan Exec)

func (*Container) Logs

func (self *Container) Logs(c chan Logs)

func (*Container) Redeploy

func (self *Container) Redeploy(reuse_volume bool) error

func RedeployContainer Returns : Error

func (*Container) Run

func (self *Container) Run(command string, c chan Exec)

func (*Container) Start

func (self *Container) Start() error

func StartContainer Returns : Error

func (*Container) Stop

func (self *Container) Stop() error

func StopContainer Returns : Error

func (*Container) Terminate

func (self *Container) Terminate() error

func TerminateContainer Returns : Error

type ContainerBinding added in v0.18.1

type ContainerBinding struct {
	Container_path string `json:"container_path"`
	Host_path      string `json:"host_path"`
	Rewritable     bool   `json:"rewritable"`
	Volume         string `json:"volume"`
}

type ContainerEnvvar added in v0.18.1

type ContainerEnvvar struct {
	Key   string `json:"key"`
	Value string `json:value`
}

type ContainerLinkInfo added in v0.18.1

type ContainerLinkInfo struct {
	Endpoints      map[string]string `json:"endpoints"`
	From_container string            `json:"from_container"`
	Name           string            `json:"name"`
	To_container   string            `json:"to_container"`
}

type ContainerPortInfo added in v0.18.1

type ContainerPortInfo struct {
	Container  string `json:"container"`
	Inner_port int    `json:"inner_port"`
	Outer_port int    `json:"outer_port"`
	Protocol   string `json:"protocol"`
}

type Event

type Event struct {
	Type         string   `json:"type"`
	Action       string   `json:"action"`
	Parents      []string `json:"parents"`
	Resource_uri string   `json:"resource_uri"`
	State        string   `json:"state"`
}

type Exec

type Exec struct {
	Type       string `json:"type"`
	Output     string `json:"output"`
	StreamType string `json:"streamType"`
}

type Image added in v0.16.19

type Image struct {
	Build_Source     BuildSource `json:"build_source"`
	Description      string      `json:"description"`
	Icon_url         string      `json:"icon_url"`
	In_use           bool        `json:"in_use"`
	Is_private_image bool        `json:"is_private_image"`
	Jumpstart        bool        `json:"jumpstart"`
	Last_build_date  string      `json:"last_build_date"`
	Name             string      `json:"name"`
	Public_url       string      `json:"public_url"`
	Registry         string      `json:"registry"`
	Resource_uri     string      `json:"resource_uri"`
	Star_count       int         `json:"star_count"`
	State            string      `json:"state"`
	Tags             []string    `json:"tags"`
}

func CreateImage added in v0.16.19

func CreateImage(createRequest ImageCreateRequest) (Image, error)

func GetImage added in v0.16.19

func GetImage(name string) (Image, error)

func (*Image) Remove added in v0.16.19

func (self *Image) Remove() error

func (*Image) Update added in v0.19.0

func (self *Image) Update(createRequest ImageCreateRequest) error

type ImageCreateRequest added in v0.16.19

type ImageCreateRequest struct {
	BuildSource *BuildSource `json:"build_source,omitempty"`
	Name        string       `json:"name,omitempty"`
	Username    string       `json:"username,omitempty"`
	Password    string       `json:"password,omitempty"`
	Description string       `json:"description,omitempty"`
}

type ImageListResponse added in v0.16.19

type ImageListResponse struct {
	Meta    Meta         `json:"meta"`
	Objects []ImageShort `json:"objects"`
}

func ListImages added in v0.16.19

func ListImages() (ImageListResponse, error)

type ImageShort added in v0.19.0

type ImageShort struct {
	Build_Source     string   `json:"build_source"`
	Description      string   `json:"description"`
	Icon_url         string   `json:"icon_url"`
	In_use           bool     `json:"in_use"`
	Is_private_image bool     `json:"is_private_image"`
	Jumpstart        bool     `json:"jumpstart"`
	Last_build_date  string   `json:"last_build_date"`
	Name             string   `json:"name"`
	Public_url       string   `json:"public_url"`
	Registry         string   `json:"registry"`
	Resource_uri     string   `json:"resource_uri"`
	Star_count       int      `json:"star_count"`
	State            string   `json:"state"`
	Tags             []string `json:"tags"`
}

type ImageTags added in v0.16.19

type ImageTags struct {
	Buildable    bool        `json:"buildable"`
	Full_name    string      `json:"full_name"`
	Layer        LayerStruct `json:"layer"`
	Image        string      `json:"image"`
	Name         string      `json:"name"`
	Resource_uri string      `json:"resource_uri"`
}

func GetImageTag added in v0.16.19

func GetImageTag(name string, tag string) (ImageTags, error)

type ImageTagsListResponse added in v0.16.19

type ImageTagsListResponse struct {
	Meta    Meta        `json:"meta"`
	Objects []ImageTags `json:"objects"`
}

type LayerStruct added in v0.16.19

type LayerStruct struct {
	Author       string            `json:"author"`
	Creation     string            `json:"creation"`
	Docker_id    string            `json:"docker_id"`
	Entrypoint   string            `json:"entrypoint"`
	Envvars      []ContainerEnvvar `json:"envvars"`
	Ports        []Port            `json:"ports"`
	Resource_uri string            `json:"resource_uri"`
	Run_command  string            `json:"run_command"`
	Volumes      []VolumePath      `json:"volumes"`
}

type Logs

type Logs struct {
	Type       string `json:"type"`
	Log        string `json:"log"`
	StreamType string `json:streamType`
	Timestamp  int    `json:"timestamp"`
}

type Meta added in v0.16.19

type Meta struct {
	Limit      int    `json:"limit"`
	Next       string `json:"next"`
	TotalCount int    `json:"total_count"`
}

type Metric added in v0.18.1

type Metric struct {
	Cpu    float64 `json:"cpu"`
	Disk   float64 `json:"disk"`
	Memory float64 `json:"memory"`
}

type Node

type Node struct {
	Availability_zone  string    `json:"availability_zone,omniempty"`
	Deployed_datetime  string    `json:"deployed_datetime,omitempty"`
	Destroyed_datetime string    `json:"destroyed_datetime,omitempty"`
	Docker_version     string    `json:"docker_version,omitempty"`
	Last_seen          string    `json:"last_seen,omitempty"`
	Node_cluster       string    `json:"node_cluster,omitempty"`
	Public_ip          string    `json:"public_ip,omitempty"`
	Region             string    `json:"region,omitempty"`
	Resource_uri       string    `json:"resource_uri,omitempty"`
	State              string    `json:"state,omitempty"`
	Tags               []NodeTag `json:"tags,omitempty"`
	Uuid               string    `json:"uuid,omitempty"`
}

func GetNode

func GetNode(uuid string) (Node, error)

func GetNode Argument : uuid Returns : Node JSON object

func (*Node) Events added in v0.16.0

func (self *Node) Events(c chan NodeEvent)

func (*Node) Terminate

func (self *Node) Terminate() error

func TerminateNode Argument : uuid Returns : Node JSON object

func (*Node) Update

func (self *Node) Update(createRequest Node) error

func UpdateNode Argument : uuid Returns : Node JSON object

func (*Node) Upgrade

func (self *Node) Upgrade() error

func UpgradeDaemon Argument : uuid Returns : Node JSON object

type NodeCluster

type NodeCluster struct {
	Current_num_nodes  int       `json:"current_num_nodes"`
	Deployed_datetime  string    `json:"deployed_datetime"`
	Destroyed_datetime string    `json:"destroyed_datetime"`
	Disk               int       `json:"disk"`
	Nodes              []string  `json:"nodes"`
	Region             string    `json:"region"`
	Resource_uri       string    `json:"resource_uri"`
	State              string    `json:"state"`
	Tags               []NodeTag `json:"tags,omitempty"`
	Target_num_nodes   int       `json:"target_num_nodes"`
	Uuid               string    `json:"uuid"`
}

func CreateNodeCluster

func CreateNodeCluster(createRequest NodeCreateRequest) (NodeCluster, error)

func CreateNodeCluster Argument : NodeCluster JSON object (see documentation) Returns : NodeCluster JSON object

func GetNodeCluster

func GetNodeCluster(uuid string) (NodeCluster, error)

func GetNodeCluster Argument : uuid Returns : NodeCluster JSON object

func (*NodeCluster) Deploy

func (self *NodeCluster) Deploy() error

func DeployNodeCluster Argument : uuid Returns : NodeCluster JSON object

func (*NodeCluster) Terminate

func (self *NodeCluster) Terminate() error

func TerminateNodeCluster Argument : uuid Returns : NodeCluster JSON object

func (*NodeCluster) Update

func (self *NodeCluster) Update(createRequest NodeCreateRequest) error

func UpdateNodeCluster Argument : uuid and nodecluster JSON object (see documentation) Returns : NodeCluster JSON object

func (*NodeCluster) Upgrade

func (self *NodeCluster) Upgrade() error

func UpgradeNodeCluster Argument : uuid Returns : NodeCluster JSON object

type NodeClusterListResponse

type NodeClusterListResponse struct {
	Meta    Meta          `json:"meta"`
	Objects []NodeCluster `json:"objects"`
}

func ListNodeClusters

func ListNodeClusters() (NodeClusterListResponse, error)

func ListNodeClusters Returns : Array of NodeCluster objects

type NodeCreateRequest

type NodeCreateRequest struct {
	Disk             int    `json:"disk,omitempty"`
	Name             string `json:"name,omitempty"`
	NodeType         string `json:"node_type,omitempty"`
	Region           string `json:"region,omitempty"`
	Target_num_nodes int    `json:"target_num_nodes,omitempty"`
	Tags             int    `json:"tags,omitempty"`
}

type NodeEvent added in v0.16.0

type NodeEvent struct {
	Type string `json:"type"`
	Log  string `json:log`
}

type NodeListResponse

type NodeListResponse struct {
	Meta    Meta   `json:"meta"`
	Objects []Node `json:"objects"`
}

func ListNodes

func ListNodes() (NodeListResponse, error)

func ListNodes Returns : Array of Node objects

type NodeTag

type NodeTag struct {
	Name string `json:"name"`
}

type NodeType

type NodeType struct {
	Available    bool     `json:"available"`
	Label        string   `json:"label"`
	Name         string   `json:"name"`
	Provider     string   `json:"provider"`
	Regions      []string `json:"regions"`
	Resource_uri string   `json:"resource_uri"`
}

func GetNodeType

func GetNodeType(provider string, name string) (NodeType, error)

func GetNodeType Argument : provider name and type name Returns : NodeType JSON object

type NodeTypeListResponse

type NodeTypeListResponse struct {
	Meta    Meta       `json:"meta"`
	Objects []NodeType `json:"objects"`
}

func ListNodeTypes

func ListNodeTypes() (NodeTypeListResponse, error)

func ListNodeTypes Returns : Array of NodeType objects

type Port added in v0.18.1

type Port struct {
	Port     int    `json:"port"`
	Protocol string `json:"protocol"`
}

type Provider

type Provider struct {
	Available    bool     `json:"available"`
	Label        string   `json:"label"`
	Name         string   `json:"name"`
	Regions      []string `json:"regions"`
	Resource_uri string   `json:"resource_uri"`
}

func GetProvider

func GetProvider(name string) (Provider, error)

func GetProvider Argument : name of the provider Returns : Provider JSON object

type ProviderListResponse

type ProviderListResponse struct {
	Meta    Meta       `json:"meta"`
	Objects []Provider `json:"objects"`
}

func ListProviders

func ListProviders() (ProviderListResponse, error)

func ListProviders Returns : Array of Provider objects

type Region

type Region struct {
	Available    bool     `json:"available"`
	Label        string   `json:"label"`
	Name         string   `json:"name"`
	Node_types   []string `json:"node_types"`
	Provider     string   `json:"provider"`
	Resource_uri string   `json:"resource_uri"`
}

func GetRegion

func GetRegion(id string) (Region, error)

func GetRegion Argument : provider name and location name Returns : Region JSON object

type RegionListResponse

type RegionListResponse struct {
	Meta    Meta     `json:"meta"`
	Objects []Region `json:"objects"`
}

func ListRegions

func ListRegions() (RegionListResponse, error)

func ListRegions Returns : Array of Region objects

type Registry added in v0.17.28

type Registry struct {
	Host              string `json:"host"`
	Icon_url          string `json:"icon_url"`
	Is_ssl            bool   `json:"is_ssl"`
	Is_tutum_registry bool   `json:"is_tutum_registry"`
	Name              string `json:"name"`
	Resource_uri      string `json:"resource_uri"`
}

func GetRegistry added in v0.17.28

func GetRegistry(registry string) (Registry, error)

type RegistryListResponse added in v0.17.28

type RegistryListResponse struct {
	Meta    Meta       `json:"meta"`
	Objects []Registry `json:"objects"`
}

func ListRegistries added in v0.17.28

func ListRegistries() (RegistryListResponse, error)

type SListResponse

type SListResponse struct {
	Meta    Meta      `json:"meta"`
	Objects []Service `json: "objects"`
}

func ListServices

func ListServices() (SListResponse, error)

func ListServices Returns : Array of Service objects

type Service

type Service struct {
	Autodestroy            string              `json:"autodestroy"`
	Autoredeploy           bool                `json:"autoredeploy"`
	Autorestart            string              `json:"autorestart"`
	Bindings               []ServiceBinding    `json:"bindings"`
	Container_envvars      []ContainerEnvvar   `json:"container_envvars"`
	Container_ports        []ContainerPortInfo `json:"container_ports"`
	Containers             []string            `json:"containers"`
	Cpu_shares             int                 `json:"cpu_shares"`
	Current_num_containers int                 `json:"current_num_containers"`
	Deployed_datetime      string              `json:"deployed_datetime"`
	Deployment_strategy    string              `json:"deployment_strategy"`
	Destroyed_datetime     string              `json:"destroyed_datetime"`
	Entrypoint             string              `json:"entrypoint"`
	Image_name             string              `json:"image_name"`
	Image_tag              string              `json:"image_tag"`
	Link_variables         map[string]string   `json:"link_variables"`
	Linked_from_service    []ServiceLinkInfo   `json:"linked_from_service"`
	Linked_to_service      []ServiceLinkInfo   `json:"linked_to_service"`
	Memory                 int                 `json:"memory"`
	Name                   string              `json:"name"`
	Net                    string              `json:"net"`
	Pid                    string              `json:"pid"`
	Privileged             bool                `json:"privileged"`
	Public_dns             string              `json:"public_dns"`
	Resource_uri           string              `json:"resource_uri"`
	Roles                  []string            `json:"roles"`
	Run_command            string              `json:"run_command"`
	Running_num_containers int                 `json:"running_num_containers"`
	Sequential_deployment  bool                `json:"sequential_deployment"`
	Stack                  string              `json:"stack"`
	Started_datetime       string              `json:"started_datetime"`
	State                  string              `json:"state"`
	Stopped_datetime       string              `json:"stopped_datetime"`
	Stopped_num_containers int                 `json:"stopped_num_containers"`
	Synchronized           bool                `json:"synchronized"`
	Tags                   []ServiceTag        `json:"tags"`
	Target_num_containers  int                 `json:"target_num_containers"`
	Uuid                   string              `json:"uuid"`
	Working_dir            string              `json:"working_dir"`
}

func CreateService

func CreateService(createRequest ServiceCreateRequest) (Service, error)

func CreateService Argument : Service JSON object (see documentation) Returns : Service JSON object

func GetService

func GetService(uuid string) (Service, error)

func GetService Argument : uuid Returns : Service JSON object

func (*Service) CallTrigger

func (self *Service) CallTrigger(trigger_uuid string) (Trigger, error)

func CallTrigger Argument : service uuid and Trigger uuid Returns : Trigger JSON object

func (*Service) CreateTrigger

func (self *Service) CreateTrigger(createRequest TriggerCreateRequest) (Trigger, error)

func CreateTrigger Argument : service uuid and Trigger JSON object Returns : Array of Trigger objects

func (*Service) DeleteTrigger

func (self *Service) DeleteTrigger(trigger_uuid string) error

func DeleteTrigger Argument : service uuid and Trigger uuid

func (*Service) GetTrigger

func (self *Service) GetTrigger(trigger_uuid string) (Trigger, error)

func GetTrigger Argument : service uuid and Trigger uuid Returns : Trigger JSON object

func (*Service) ListTriggers

func (self *Service) ListTriggers() (TriggerListResponse, error)

func ListTriggers Returns : Array of Trigger objects

func (*Service) Logs

func (self *Service) Logs(c chan Logs)

func (*Service) Redeploy

func (self *Service) Redeploy(reuse_volume bool) error

func RedeployService Returns : Error

func (*Service) Scale

func (self *Service) Scale() error

func UpdateService Argument : updatedService JSON object Returns : Error

func (*Service) Start

func (self *Service) Start() error

func StartService Returns : Error

func (*Service) StopService

func (self *Service) StopService() error

func StopService Returns : Error

func (*Service) TerminateService

func (self *Service) TerminateService() error

func TerminateService Returns : Error

func (*Service) Update

func (self *Service) Update(createRequest ServiceCreateRequest) error

func UpdateService Argument : updatedService JSON object Returns : Error

type ServiceBinding added in v0.18.1

type ServiceBinding struct {
	Container_path string `json:"container_path"`
	Host_path      string `json:"host_path"`
	Rewritable     bool   `json:"rewritable"`
	Volumes_from   string `json:"volume_from"`
}

type ServiceCreateRequest

type ServiceCreateRequest struct {
	Autodestroy           string              `json:"autodestroy,omitempty"`
	Autoredeploy          bool                `json:"autoredeploy,omitempty"`
	Autorestart           string              `json:"autorestart,omitempty"`
	Container_ports       []ContainerPortInfo `json:"container_ports,omitempty"`
	Entrypoint            string              `json:"entrypoint,omitempty"`
	Image                 string              `json:"image,omitempty"`
	Linked_to_service     []ServiceLinkInfo   `json:"linked_to_service,omitempty"`
	Name                  string              `json:"name,omitempty"`
	Tags                  []string            `json:"tags,omitempty"`
	Target_num_containers int                 `json:"target_num_containers,omitempty"`
}

type ServiceLinkInfo added in v0.18.1

type ServiceLinkInfo struct {
	From_service string `json:"from_service"`
	Name         string `json:"name"`
	To_service   string `json:"to_service"`
}

type ServiceTag added in v0.18.1

type ServiceTag struct {
	Name string `json:"name"`
}

type Stack

type Stack struct {
	Deployed_datetime  string   `json:"deployed_datetime"`
	Destroyed_datetime string   `json:"destroyed_datetime`
	Name               string   `json:"name"`
	Resource_uri       string   `json:"resource_uri`
	Services           []string `json:"services"`
	State              string   `json:"state"`
	Synchronized       bool     `json:"synchronized"`
	Uuid               string   `json:"uuid"`
}

func CreateStack

func CreateStack(createRequest StackCreateRequest) (Stack, error)

func CreateStack Argument : Stack JSON object (see documentation)

func GetStack

func GetStack(uuid string) (Stack, error)

func GetStack Argument : uuid Returns : Stack JSON object

func (*Stack) ExportStack

func (self *Stack) ExportStack() (string, error)

func Export Returns : String that contains the Stack details

func (*Stack) Redeploy

func (self *Stack) Redeploy(reuse_volumes bool) error

func (*Stack) Start

func (self *Stack) Start() error

func (*Stack) Stop

func (self *Stack) Stop() error

func (*Stack) Terminate

func (self *Stack) Terminate() error

func (*Stack) Update

func (self *Stack) Update(createRequest StackCreateRequest) error

func Update Argument : a Stack JSON object (see documentation)

type StackCreateRequest

type StackCreateRequest struct {
	Name     string                 `json:"name,omitempty"`
	Services []ServiceCreateRequest `json:"services,omitempty"`
}

type StackListResponse

type StackListResponse struct {
	Meta    Meta    `json:"meta"`
	Objects []Stack `json:"objects"`
}

func ListStacks

func ListStacks() (StackListResponse, error)

func ListStacks Returns : Array of Stack objects

type Token

type Token struct {
	Token string `json:"token"`
}

func CreateToken

func CreateToken() (Token, error)

func CreateToken Returns : Token JSON object

type Trigger

type Trigger struct {
	Url          string `json:"url,omitempty"`
	Name         string `json:"name"`
	Operation    string `json:"operation"`
	Resource_uri string `json:"resource_uri,omitempty"`
}

type TriggerCreateRequest added in v0.15.1

type TriggerCreateRequest struct {
	Name      string `json:"name"`
	Operation string `json:"operation"`
}

type TriggerListResponse

type TriggerListResponse struct {
	Meta    Meta      `json:"meta"`
	Objects []Trigger `json:"objects"`
}

type TutumObject

type TutumObject interface {
	Start() error
	Stop() error
	Redeploy() error
	Terminate() error
	Deploy() error
	Upgrade() error
	Update([]byte) error
}

type Volume

type Volume struct {
	Containers   []string `json:"containers"`
	Node         string   `json:"node"`
	Resource_uri string   `json:"resource_uri"`
	State        string   `json:"state"`
	Uuid         string   `json:"uuid"`
	Volume_group string   `json:"volume_group"`
}

func GetVolume

func GetVolume(uuid string) (Volume, error)

func GetVolume Argument : uuid Returns : Volume JSON object

type VolumeGroup

type VolumeGroup struct {
	Name         string   `json:"name"`
	Resource_uri string   `json:"resource_uri"`
	Services     []string `json:"services"`
	State        string   `json:"state"`
	Uuid         string   `json:"uuid"`
	Volume       []string `json:"volume"`
}

func GetVolumeGroup

func GetVolumeGroup(uuid string) (VolumeGroup, error)

func GetVolumeGroup Argument : uuid Returns : VolumeGroup JSON object

type VolumeGroupListResponse

type VolumeGroupListResponse struct {
	Meta    Meta          `json:"meta"`
	Objects []VolumeGroup `json:"objects"`
}

func ListVolumeGroups

func ListVolumeGroups() (VolumeGroupListResponse, error)

func ListVolumeGroups Returns : Array of VolumeGroup objects

type VolumeListResponse

type VolumeListResponse struct {
	Meta    Meta     `json:"meta"`
	Objects []Volume `json:"objects"`
}

func ListVolumes

func ListVolumes() (VolumeListResponse, error)

func ListVolumes Returns : Array of Volume objects

type VolumePath added in v0.16.19

type VolumePath struct {
	Container_path string `json:"container_path"`
}

Jump to

Keyboard shortcuts

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