Documentation ¶
Index ¶
- Constants
- Variables
- func FetchByResourceUri(id string) interface{}
- func IsAuthenticated() bool
- func LoadAuth() error
- func MockupResponse(response_file string) (string, error)
- func SetBaseUrl() string
- func SetUserAgent(name string) string
- func TutumCall(url string, requestType string, requestBody []byte) ([]byte, error)
- func TutumEvents(c chan Event, e chan error)
- type AZ
- type AZListResponse
- type Action
- type ActionListResponse
- type Auth
- type BuildSettings
- type BuildSource
- type CListResponse
- type Container
- func (self *Container) Exec(command string, c chan Exec)
- func (self *Container) Logs(c chan Logs)
- func (self *Container) Redeploy(reuse_volume bool) error
- func (self *Container) Run(command string, c chan Exec)
- func (self *Container) Start() error
- func (self *Container) Stop() error
- func (self *Container) Terminate() error
- type ContainerBinding
- type ContainerEnvvar
- type ContainerLinkInfo
- type ContainerPortInfo
- type Event
- type Exec
- type Image
- type ImageCreateRequest
- type ImageListResponse
- type ImageShort
- type ImageTags
- type ImageTagsListResponse
- type LayerStruct
- type Logs
- type Meta
- type Metric
- type Node
- type NodeCluster
- type NodeClusterListResponse
- type NodeCreateRequest
- type NodeEvent
- type NodeListResponse
- type NodeTag
- type NodeType
- type NodeTypeListResponse
- type Port
- type Provider
- type ProviderListResponse
- type Region
- type RegionListResponse
- type Registry
- type RegistryListResponse
- type SListResponse
- type Service
- func (self *Service) CallTrigger(trigger_uuid string) (Trigger, error)
- func (self *Service) CreateTrigger(createRequest TriggerCreateRequest) (Trigger, error)
- func (self *Service) DeleteTrigger(trigger_uuid string) error
- func (self *Service) GetTrigger(trigger_uuid string) (Trigger, error)
- func (self *Service) ListTriggers() (TriggerListResponse, error)
- func (self *Service) Logs(c chan Logs)
- func (self *Service) Redeploy(reuse_volume bool) error
- func (self *Service) Scale() error
- func (self *Service) Start() error
- func (self *Service) StopService() error
- func (self *Service) TerminateService() error
- func (self *Service) Update(createRequest ServiceCreateRequest) error
- type ServiceBinding
- type ServiceCreateRequest
- type ServiceLinkInfo
- type ServiceTag
- type Stack
- type StackCreateRequest
- type StackListResponse
- type Token
- type Trigger
- type TriggerCreateRequest
- type TriggerListResponse
- type TutumObject
- type Volume
- type VolumeGroup
- type VolumeGroupListResponse
- type VolumeListResponse
- type VolumePath
Constants ¶
Variables ¶
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 MockupResponse ¶
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 TutumEvents ¶
Types ¶
type AZ ¶ added in v0.16.0
type AZListResponse ¶ added in v0.16.0
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"` }
type ActionListResponse ¶
func ListActions ¶
func ListActions() (ActionListResponse, error)
func ListActions Returns : Array of Action objects
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 CListResponse ¶
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"` 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 Argument : uuid Returns : Container JSON object
type ContainerBinding ¶ added in v0.18.1
type ContainerEnvvar ¶ added in v0.18.1
type ContainerLinkInfo ¶ added in v0.18.1
type ContainerPortInfo ¶ added in v0.18.1
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 (*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 ImageTagsListResponse ¶ added in v0.16.19
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 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"` }
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 NodeListResponse ¶
func ListNodes ¶
func ListNodes() (NodeListResponse, error)
func ListNodes Returns : Array of Node objects
type NodeType ¶
type NodeTypeListResponse ¶
func ListNodeTypes ¶
func ListNodeTypes() (NodeTypeListResponse, error)
func ListNodeTypes Returns : Array of NodeType objects
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 Argument : name of the provider Returns : Provider JSON object
type ProviderListResponse ¶
func ListProviders ¶
func ListProviders() (ProviderListResponse, error)
func ListProviders Returns : Array of Provider objects
type Region ¶
type RegionListResponse ¶
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
type RegistryListResponse ¶ added in v0.17.28
func ListRegistries ¶ added in v0.17.28
func ListRegistries() (RegistryListResponse, error)
type SListResponse ¶
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"` 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 Argument : uuid Returns : Service JSON object
func (*Service) CallTrigger ¶
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 DeleteTrigger Argument : service uuid and Trigger uuid
func (*Service) GetTrigger ¶
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) StopService ¶
func StopService Returns : Error
func (*Service) TerminateService ¶
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 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 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 (*Stack) ExportStack ¶
func Export Returns : String that contains the Stack details
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 ¶
func ListStacks ¶
func ListStacks() (StackListResponse, error)
func ListStacks Returns : Array of Stack objects
type TriggerCreateRequest ¶ added in v0.15.1
type TriggerListResponse ¶
type TutumObject ¶
type Volume ¶
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 ¶
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"`
}