Documentation ¶
Index ¶
- Constants
- func DecodeBytes(encodedByteArray []byte) []byte
- func DeleteIfExists(file string) error
- func EncodeBytes(decodedByteArray []byte) []byte
- func ExistsFile(file string) bool
- func GetEmergencyFolder() string
- func GetLockFile(id string) string
- func HasLock(containerId string, resourceId string) bool
- func HomeFolder() string
- func InstanceEnvironmentToString(env EnvironmentType) string
- func InstanceInstallationToString(role InstallationType) string
- func InstanceRoleToString(role RoleType) string
- func MakeFolderIfNotExists(folder string) error
- func NewUUIDString() string
- func PrintFieldsHeader(print bool)
- func PrintFieldsRecursively(fields []FieldData, index int)
- func RemoveLock(containerId string, resourceId string) bool
- func VMBaseFolder() string
- func WriteLock(containerId string, resourceId string) bool
- type CloudInstance
- type CloudMachine
- type CommandSet
- type DeploymentRole
- type Disk
- type Domain
- type DomainState
- type EngineOpt
- type EnvironmentType
- type FieldData
- type IONature
- type Infrastructure
- type Installation
- type InstallationPlan
- type InstallationType
- type InstanceState
- type LocalInstance
- type LocalMachine
- type LogStorage
- type MachineActions
- type MachineDomain
- type MachineEnvironment
- type MachineISO
- type MachineNetwork
- type MachineRole
- type Network
- type NetworkState
- type Project
- type ProjectEngineOpt
- type ProjectImport
- type ProjectSwarmOpt
- type ProjectsDescriptor
- func (element *ProjectsDescriptor) Import(file string, format string) error
- func (element *ProjectsDescriptor) Load(file string) error
- func (element *ProjectsDescriptor) PostImport() error
- func (element *ProjectsDescriptor) Save(file string) error
- func (element *ProjectsDescriptor) Validate() []error
- type ProjectsIndex
- type RoleType
- type State
- type SwarmOpt
Constants ¶
const TagDescName = "descr"
const TagMandatoryName = "mandatory"
const TagTypeName = "type"
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
func DeleteIfExists ¶
func EncodeBytes ¶
func ExistsFile ¶
func GetEmergencyFolder ¶
func GetEmergencyFolder() string
func GetLockFile ¶
func HomeFolder ¶
func HomeFolder() string
func InstanceEnvironmentToString ¶
func InstanceEnvironmentToString(env EnvironmentType) string
func InstanceInstallationToString ¶
func InstanceInstallationToString(role InstallationType) string
func InstanceRoleToString ¶
func MakeFolderIfNotExists ¶
func NewUUIDString ¶
func NewUUIDString() string
func PrintFieldsHeader ¶
func PrintFieldsHeader(print bool)
func PrintFieldsRecursively ¶
func RemoveLock ¶
func VMBaseFolder ¶
func VMBaseFolder() string
Types ¶
type CloudInstance ¶
type CloudInstance struct { Id string `json:"Id" xml:"Id"` MachineId string `json:"MachineId" xml:"MachineId"` Name string `json:"Name" xml:"Name"` Driver string `json:"Driver" xml:"Driver"` Hostname string `json:"Hostname" xml:"Hostname"` Roles []string `json:"Roles" xml:"Roles"` Options [][]string `json:"Options" xml:"Options"` IPAddress string `json:"IPAddress" xml:"IPAddress"` InspectJSON string `json:"InspectJSON" xml:"InspectJSON"` Logs LogStorage `json:"Logs" xml:"Logs"` Disabled bool `json:"Disabled" xml:"Disabled"` }
Describe Cloud Machine options, contains
Id (string) Unique Identifier
MachineId (string) Project Cloud Machine Unique Identifier
Name (string) Cloud Instance Name
Driver (string) Cloud Machine Driver (amazonec2, digitalocean, azure, etc...)
Hostname (string) Cloud Machine Hostname
Roles ([]string) Roles used in the deployment plan
Options ([][]string) Cloud Machine Options
IPAddress (string) Cloud IP Address
InspectJSON (string) Inspection Data JSON
Logs (LogStorage) Log information data
Disabled (bool) The Instance is locked on operations
Refers to : https://docs.docker.com/machine/drivers/
func (*CloudInstance) Import ¶
func (element *CloudInstance) Import(file string, format string) error
func (*CloudInstance) Load ¶
func (element *CloudInstance) Load(file string) error
func (*CloudInstance) PostImport ¶
func (element *CloudInstance) PostImport() error
func (*CloudInstance) Save ¶
func (element *CloudInstance) Save(file string) error
func (*CloudInstance) Validate ¶
func (element *CloudInstance) Validate() []error
type CloudMachine ¶
type CloudMachine struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Cloud Instance Name" type:"text"` Driver string `json:"Driver" xml:"Driver" mandatory:"yes" descr:"Cloud Machine Driver (amazonec2, digitalocean, azure, etc...)" type:"text"` Hostname string `json:"Hostname" xml:"Hostname" mandatory:"yes" descr:"Logical Machine Hostname" type:"text"` Roles []string `json:"Roles" xml:"Roles" mandatory:"no" descr:"Roles used in the deployment plan" type:"text list"` Options [][]string `` /* 212-byte string literal not displayed */ }
Describe Cloud Machine options, contains
Id (string) Unique Identifier
Name (string) Cloud Instance Name
Driver (string) Cloud Machine Driver (amazonec2, digitalocean, azure, etc...)
Hostname (string) Logical Machine Hostname
Roles ([]string) Roles used in the deployment plan
Options ([][]string) Cloud Machine Options (vendor specific options) without driver (i.e.: --<driver>-<option>), no value options are accepted
Refers to : https://docs.docker.com/machine/drivers/
func (*CloudMachine) Load ¶
func (element *CloudMachine) Load(file string) error
func (*CloudMachine) PostImport ¶
func (element *CloudMachine) PostImport() error
func (*CloudMachine) Save ¶
func (element *CloudMachine) Save(file string) error
func (*CloudMachine) Validate ¶
func (element *CloudMachine) Validate() []error
type CommandSet ¶
type CommandSet string
Describe Command Set Type Enum (Rancher OS)
VirtKube Virtual Kube Command Set
Ansible Ansible Command Set
Helm Helm Command Set
const ( VirtKubeCmdSet CommandSet = "VirtKube" AnsibleCmdSet CommandSet = "Ansible" HelmCmdSet CommandSet = "Helm" )
type DeploymentRole ¶
type DeploymentRole string
Describe Installation Role Enum
Machine Take Part to installation cluster as Main Machine
Host Take part to installation cluster as simple host
const ( MachineDeployment DeploymentRole = "Machine" HostDeployment DeploymentRole = "Host" )
type Disk ¶
type Disk struct { Id string `json:"Id" xml:"Id"` Name string `json:"Name" xml:"Name"` Type int `json:"Type" xml:"Type"` Size int `json:"Size" xml:"Size"` }
Describe Disk feature, contains
Id (string) Unique Identifier
Name (string) Local Disk Name
Type (int) Disk Type
Size (int) Disk Size in MB
type Domain ¶
type Domain struct { Id string `json:"Id" xml:"Id"` Name string `json:"Name" xml:"Name"` Networks []Network `json:"Networks" xml:"Networks"` Options [][]string `json:"Options" xml:"Options"` }
Describe domain options, contains
Id (string) Unique Identifier
Name (string) Domain Name
Networks ([]Networks) Networks List
Options ([][]string) Specific Domain information (eg. cloud provider info or local info)
func (*Domain) PostImport ¶
type DomainState ¶
type DomainState struct { Id string `json:"Id" xml:"Id"` DomainId string `json:"DomainId" xml:"DomainId"` NetworkStates []NetworkState `json:"NetworkStates" xml:"NetworkStates"` Creation time.Time `json:"Creation" xml:"Creation"` Modified time.Time `json:"Modified" xml:"Modified"` Created bool `json:"Created" xml:"Created"` Altered bool `json:"Altered" xml:"Altered"` Errors bool `json:"Errors" xml:"Errors"` LastMessage string `json:"LastMessage" xml:"LastMessage"` }
Describe Domain State, contains
Id (string) State Unique Identifier
DomainId (string) Target Domain Id
NetworkStates ([]NetworkState) List Of Network States
Creation (time.Time ) Creation Date
Modified (time.Time ) Last Modification Date
Created (bool) Creation State
Altered (bool) Alteration State
Errors (bool) Error State
LastMessage (string) Last Alternation Message
func (*DomainState) Load ¶
func (element *DomainState) Load(file string) error
func (*DomainState) PostImport ¶
func (element *DomainState) PostImport() error
func (*DomainState) Save ¶
func (element *DomainState) Save(file string) error
func (*DomainState) Validate ¶
func (element *DomainState) Validate() []error
type EngineOpt ¶
type EngineOpt struct { Environment []string `json:"Environment" xml:"Environment"` InsecureRegistry []string `json:"InsecureRegistry" xml:"InsecureRegistry"` RegistryMirror []string `json:"RegistryMirror" xml:"RegistryMirror"` StorageDriver string `json:"StorageDriver" xml:"StorageDriver"` InstallURL string `json:"InstallURL" xml:"InstallURL"` Labels []string `json:"Labels" xml:"Labels"` Options []string `json:"Options" xml:"Options"` }
Describe Docker Engine options, contains
Environment ([]string) Environment variables
InsecureRegistry ([]string) Insecure Registry Options
RegistryMirror ([]string) Registry Mirror Options
StorageDriver (string) Storage Driver
InstallURL (string) Docker Install URL (e.g.: https://get.docker.com)
Labels ([]string) Engine Labels
Options ([]string) Engine Options
func ToInstanceEngineOpt ¶
func ToInstanceEngineOpt(opt ProjectEngineOpt) EngineOpt
type EnvironmentType ¶
type EnvironmentType int
Describe Environment Type Enum (Rancher OS)
Cattle Cattle Environment
Kubernetes Kubernetes Environment
Mesos Mesos Environment
Swarm Swarm Environment
Custom Custom Environment
const ( Cattle EnvironmentType = iota // value 0 Kubernetes Mesos Swarm Custom )
func ToInstanceEnvironment ¶
func ToInstanceEnvironment(env MachineEnvironment) EnvironmentType
type FieldData ¶
type FieldData struct { JName string XName string Type string Desc string Mandatory bool Fields []FieldData }
func DescribeStruct ¶
type Infrastructure ¶
type Infrastructure struct { Id string `json:"Id" xml:"Id"` ProjectId string `json:"ProjectId" xml:"ProjectId"` Name string `json:"Name" xml:"Name"` Domains []Domain `json:"Domains" xml:"Domains"` State State `json:"State" xml:"State"` Creation time.Time `json:"Creation" xml:"Creation"` Modified time.Time `json:"Modified" xml:"Modified"` Created bool `json:"Created" xml:"Created"` Altered bool `json:"Altered" xml:"Altered"` Errors bool `json:"Errors" xml:"Errors"` LastMessage string `json:"LastMessage" xml:"LastMessage"` }
Describe Entire Infrastructure, contains
Id (string) Infrastructure Unique Identifier
ProjectId (string) Related Project Unique Identifier
Name (string) Infrastructure Name
Domains ([]Domain) List Of Domains
State (State) Creation State
Creation (time.Time ) Creation Date
Modified (time.Time ) Last Modification Date
Created (bool) Creation State
Altered (bool) Alteration State
Errors (bool) Error State
LastMessage (string) Last Alternation Message
func (*Infrastructure) Import ¶
func (element *Infrastructure) Import(file string, format string) error
func (*Infrastructure) Load ¶
func (element *Infrastructure) Load(file string) error
func (*Infrastructure) PostImport ¶
func (element *Infrastructure) PostImport() error
func (*Infrastructure) Save ¶
func (element *Infrastructure) Save(file string) error
func (*Infrastructure) Validate ¶
func (element *Infrastructure) Validate() []error
type Installation ¶
type Installation struct { Id string `json:"Id" xml:"Id"` InstanceId string `json:"InstanceId" xml:"InstanceId"` IsCloud bool `json:"IsCloud" xml:"IsCloud"` Type InstallationType `json:"Type" xml:"Type"` Environment EnvironmentType `json:"Environment" xml:"Environment"` Role RoleType `json:"Role" xml:"Role"` Plan InstallationPlan `json:"Plan" xml:"Plan"` LastExecution time.Time `json:"LastExecution" xml:"LastExecution"` Success bool `json:"Success" xml:"Success"` Errors bool `json:"Errors" xml:"Errors"` LastMessage string `json:"LastMessage" xml:"LastMessage"` Logs LogStorage `json:"Logs" xml:"Logs"` }
Describe Machine Installation options, contains
Id (string) Unique Identifier
InstanceId (string) Target Instance Id
IsCloud (bool) Is A Cloud Instance
Type (InstallationType) Installation Type
Environment (RoleType) Installation Environment (Rancher)
Role (EnvironmentType) Installation Role
Plan (InstallationPlan) Reference to installation plan
LastExecution (time.Time ) Last Execution Date
Success (bool) Success State
Errors (bool) Error State
LastMessage (string) Last Error Message
Logs (LogStorage) Installation Log File Descriptor
func (*Installation) Load ¶
func (element *Installation) Load(file string) error
func (*Installation) PostImport ¶
func (element *Installation) PostImport() error
func (*Installation) Save ¶
func (element *Installation) Save(file string) error
func (*Installation) Validate ¶
func (element *Installation) Validate() []error
type InstallationPlan ¶
type InstallationPlan struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` MachineId string `json:"MachineId" xml:"MachineId" mandatory:"yes" descr:"Target Machine Id" type:"text"` IsCloud bool `json:"IsCloud" xml:"IsCloud" mandatory:"yes" descr:"Is A Cloud Machine" type:"boolean"` Type DeploymentRole `json:"Type" xml:"Type" mandatory:"yes" descr:"Installation Type (Machine,Host)" type:"text"` Role MachineRole `` /* 133-byte string literal not displayed */ Environment MachineEnvironment `json:"Role" xml:"Role" mandatory:"yes" descr:"Installation Environment (Cattle,Kubernetes,Mesos,Swarm,Custom)" type:"text"` MainCommandSet CommandSet `` /* 135-byte string literal not displayed */ MainCommandRef string `` /* 150-byte string literal not displayed */ ProvisionCommandSet CommandSet `` /* 145-byte string literal not displayed */ ProvisionCommandRef string `` /* 157-byte string literal not displayed */ }
Describe Machine Installation Plan, contains
Id (string) Unique Identifier
MachineId (string) Target Machine Id
IsCloud (bool) Is A Cloud Machine
Type (InstallationRole) Installation Type (Machine,Host)
Environment (ProjectEnvironment) Installation Environment (Cattle,Kubernetes,Mesos,Swarm,Custom)
Role (SystemRole) Installation Role (Stand-Alone,Master,Slave,Cluster-Memeber)
MainCommandSet (CommandSet) Command Set used for installation (VirtKube,Ansible,Helm)
MainCommandRef (string) Location of installation commands (http,file,git protocols are accepted)
ProvisionCommandSet (CommandSet) Command Set used for provisioning (VirtKube,Ansible,Helm)
ProvisionCommandRef (string) Location of provision commands (http,file,git protocols are accepted)
func (*InstallationPlan) Import ¶
func (element *InstallationPlan) Import(file string, format string) error
func (*InstallationPlan) Load ¶
func (element *InstallationPlan) Load(file string) error
func (*InstallationPlan) PostImport ¶
func (element *InstallationPlan) PostImport() error
func (*InstallationPlan) Save ¶
func (element *InstallationPlan) Save(file string) error
func (*InstallationPlan) Validate ¶
func (element *InstallationPlan) Validate() []error
type InstallationType ¶
type InstallationType int
Describe Installation Type Enum
Machine Take Part to installation cluster as Main Machine
Host Take part to installation cluster as simple host
const ( MachineType InstallationType = iota // value 0 HostType )
func ToInstanceInstallation ¶
func ToInstanceInstallation(role DeploymentRole) InstallationType
type InstanceState ¶
type InstanceState struct { Id string `json:"Id" xml:"Id"` Hostname string `json:"Hostname" xml:"Hostname"` IPAddresses []string `json:"IPAddresses" xml:"IPAddresses"` InstanceId string `json:"InstanceId" xml:"InstanceId"` IsCloud bool `json:"IsCloud" xml:"IsCloud"` NetworkId string `json:"NetworkId" xml:"NetworkId"` DomainId string `json:"DomainId" xml:"DomainId"` Creation time.Time `json:"Creation" xml:"Creation"` Modified time.Time `json:"Modified" xml:"Modified"` Created bool `json:"Created" xml:"Created"` Altered bool `json:"Altered" xml:"Altered"` Errors bool `json:"Errors" xml:"Errors"` LastMessage string `json:"LastMessage" xml:"LastMessage"` }
Describe Machine State, contains
Id (string) State Unique Identifier
Hostname (string) Defined Host Name
IPAddresses ([]string) Computed IP Address
InstanceId (string) Target Instance Id
IsCloud (bool) Is A Cloud Machine
NetworkId (string) Target Network Id
DomainId (string) Target Domain Id
Creation (time.Time ) Creation Date
Modified (time.Time ) Last Modification Date
Created (bool) Creation State
Altered (bool) Alteration State
Errors (bool) Error State
LastMessage (string) Last Alternation Message
func (*InstanceState) Import ¶
func (element *InstanceState) Import(file string, format string) error
func (*InstanceState) Load ¶
func (element *InstanceState) Load(file string) error
func (*InstanceState) PostImport ¶
func (element *InstanceState) PostImport() error
func (*InstanceState) Save ¶
func (element *InstanceState) Save(file string) error
func (*InstanceState) Validate ¶
func (element *InstanceState) Validate() []error
type LocalInstance ¶
type LocalInstance struct { Id string `json:"Id" xml:"Id"` MachineId string `json:"MachineId" xml:"MachineId"` Name string `json:"Name" xml:"Name"` Roles []string `json:"Roles" xml:"Roles"` Driver string `json:"Driver" xml:"Driver"` Memory int `json:"Memory" xml:"Memory"` Cpus int `json:"Cpus" xml:"Cpus"` Disks []Disk `json:"Disks" xml:"Disks"` Swarm SwarmOpt `json:"Swarm" xml:"Swarm"` Engine EngineOpt `json:"Engine" xml:"Engine"` OSType string `json:"OSType" xml:"OSType"` OSVersion string `json:"OSVersion" xml:"OSVersion"` Options [][]string `json:"Options" xml:"Options"` Hostname string `json:"Hostname" xml:"Hostname"` IPAddress string `json:"IPAddress" xml:"IPAddress"` InspectJSON string `json:"InspectJSON" xml:"InspectJSON"` Logs LogStorage `json:"Logs" xml:"Logs"` Disabled bool `json:"Disabled" xml:"Disabled"` }
Describe Machine options, contains
Id (string) Unique Identifier
MachineId (string) Project Machine Unique Identifier
Name (string) Machine Local Name
Roles ([]string) Roles used in the deployment plan
Driver (string) Machine Driver (virtualbox,vmware,hyperv) ref: https://docs.docker.com/machine/drivers/
Memory (int) Memory Size MB
Cpus (int) Number of Logical Cores
Swarm (SwarmOpt) Swarm Options
Engine (EngineOpt) Engine Options
OSType (string) Machine OS Type (ref: https://docs.docker.com/machine/drivers/os-base/)
OSVersion (string) Machine OS Version (ref: https://docs.docker.com/machine/drivers/os-base/)
NoShare (bool) Do not mount home as shared folder
Options ([][]string) Specific vendor option in format key value pairs array without signs (e.g.: --<driver>)
Hostname (string) Network Machine Hostname
IPAddress (string) Network IP Address
InspectJSON (string) Inspection Data JSON
Logs (LogStorage) Log information data
Disabled (bool) The Instance is locked on operations
func (*LocalInstance) Import ¶
func (element *LocalInstance) Import(file string, format string) error
func (*LocalInstance) Load ¶
func (element *LocalInstance) Load(file string) error
func (*LocalInstance) PostImport ¶
func (element *LocalInstance) PostImport() error
func (*LocalInstance) Save ¶
func (element *LocalInstance) Save(file string) error
func (*LocalInstance) Validate ¶
func (element *LocalInstance) Validate() []error
type LocalMachine ¶
type LocalMachine struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Machine Local Name" type:"text"` Roles []string `json:"Roles" xml:"Roles" mandatory:"no" descr:"Roles used in the deployment plan" type:"text list"` Driver string `` /* 150-byte string literal not displayed */ Memory int `json:"Memory" xml:"Memory" mandatory:"no" descr:"Memory Size MB" type:"integer"` Cpus int `json:"Cpus" xml:"Cpus" mandatory:"no" descr:"Number of Logical Cores" type:"integer"` DiskSize int `json:"DiskSize" xml:"DiskSize" mandatory:"no" descr:"Dimension of disk root (in GB)" type:"integer"` Swarm ProjectSwarmOpt `json:"Swarm" xml:"Swarm" mandatory:"no" descr:"Swarm Options" type:"object Swarm"` Engine ProjectEngineOpt `json:"Engine" xml:"Engine" mandatory:"no" descr:"Engine Options" type:"object Engine"` OSType string `` /* 134-byte string literal not displayed */ OSVersion string `` /* 143-byte string literal not displayed */ Options [][]string `` /* 217-byte string literal not displayed */ Hostname string `json:"Hostname" xml:"Hostname" mandatory:"yes" descr:"Logical Machine Hostname" type:"text"` }
Describe Machine options, contains
Id (string) Unique Identifier
Name (string) Machine Local Name
Roles ([]string) Roles used in the deployment plan
Driver (string) Machine Driver (virtualbox,vmware,hyperv) ref: https://docs.docker.com/machine/drivers/
Memory (int) Memory Size MB
Cpus (int) Number of Logical Cores
DiskSize (int) Dimension of disk root (in GB)
Swarm (SwarmOpt) Swarm Options
Engine (EngineOpt) Engine Options
OSType (string) Machine OS Type (ref: https://docs.docker.com/machine/drivers/os-base/)
OSVersion (string) Machine OS Version (ref: https://docs.docker.com/machine/drivers/os-base/)
NoShare (string) Mount or not home as shared folder
Options ([][]string) Specific vendor option in format key value pairs array without driver (i.e.: --<driver>-<option>), no value options are accepted
Hostname (string) Logical Machine Hostname
func (*LocalMachine) Load ¶
func (element *LocalMachine) Load(file string) error
func (*LocalMachine) PostImport ¶
func (element *LocalMachine) PostImport() error
func (*LocalMachine) Save ¶
func (element *LocalMachine) Save(file string) error
func (*LocalMachine) Validate ¶
func (element *LocalMachine) Validate() []error
type LogStorage ¶
type LogStorage struct { InfraId string `json:"Id" xml:"Id" mandatory:"yes" descr:"Infrastructure Unique Identifier" type:"text"` ProjectId string `json:"ProjectId" xml:"ProjectId" mandatory:"yes" descr:"Project Unique Identifier"` ElementId string `json:"ElementId" xml:"ElementId" mandatory:"yes" descr:"Infrastructure Element Unique Identifier"` LogLines []string `json:"LogLines" xml:"LogLines,omitempty" mandatory:"no" descr:"Log information data"` }
Describe Log Storage, contains
ProjectId (string) Infrastructure Unique Identifier
ProjectId (string) Project Unique Identifier
ElementId (string) Infrastructure Element Unique Identifier
LogLines ([]string) Log information data
func (*LogStorage) Load ¶
func (element *LogStorage) Load(file string) error
func (*LogStorage) PostImport ¶
func (element *LogStorage) PostImport() error
func (*LogStorage) Save ¶
func (element *LogStorage) Save(file string) error
func (*LogStorage) Validate ¶
func (element *LogStorage) Validate() []error
type MachineActions ¶
type MachineDomain ¶
type MachineDomain struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Domain Name" type:"text"` Networks []MachineNetwork `json:"Networks" xml:"Networks" mandatory:"yes" descr:"Networks List" type:"ovject Networks list"` Options [][]string `` /* 156-byte string literal not displayed */ }
Describe domain options, contains
Id (string) Unique Identifier
Name (string) Domain Name
Networks ([]ProjectNetwork) Networks List
Options ([][]string) Specific Domain information (eg. cloud provider info or local info)
func (*MachineDomain) Import ¶
func (element *MachineDomain) Import(file string, format string) error
func (*MachineDomain) Load ¶
func (element *MachineDomain) Load(file string) error
func (*MachineDomain) PostImport ¶
func (element *MachineDomain) PostImport() error
func (*MachineDomain) Save ¶
func (element *MachineDomain) Save(file string) error
func (*MachineDomain) Validate ¶
func (element *MachineDomain) Validate() []error
type MachineEnvironment ¶
type MachineEnvironment string
Describe Environment Project Environment Enum (Rancher OS)
Cattle Cattle Environment
Kubernetes Kubernetes Environment
Mesos Mesos Environment
Swarm Swarm Environment
Custom Custom Environment
const ( CattleEnv MachineEnvironment = "Cattle" KubernetesEnv MachineEnvironment = "Kubernetes" MesosEnv MachineEnvironment = "Mesos" SwarmEnv MachineEnvironment = "Swarm" CustomEnv MachineEnvironment = "Custom" )
type MachineISO ¶
type MachineISO struct { Name string `json:"name" xml:"name"` BaseURL string `json:"baseurl" xml:"baseurl"` ISOName string `json:"isoname" xml:"isoname"` FolderName string `json:"folder" xml:"folder"` FinalNamePrefix string `json:"fileprefix" xml:"fileprefix"` FinalNameSuffix string `json:"filesuffix" xml:"filesuffix"` }
func GetMachineAction ¶
func GetMachineAction(name string) (*MachineISO, error)
func (*MachineISO) Check ¶
func (isoTemplate *MachineISO) Check(version string) bool
func (*MachineISO) Download ¶
func (isoTemplate *MachineISO) Download(version string) bool
func (*MachineISO) Path ¶
func (isoTemplate *MachineISO) Path(version string) string
type MachineNetwork ¶
type MachineNetwork struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Network Name" type:"text"` LocalMachines []LocalMachine `json:"LocalMachines" xml:"LocalMachines" mandatory:"yes" descr:"Machine List" type:"object Machines list"` CloudMachines []CloudMachine `json:"CloudMachines" xml:"CloudMachines" mandatory:"yes" descr:"Cloud Machine List" type:"object CMachines list"` Installations []InstallationPlan `json:"Installations" xml:"Installations" mandatory:"no" descr:"Machine Installation Plans" type:"object Installations list"` Options [][]string `` /* 157-byte string literal not displayed */ }
Describe Network options, contains
Id (string) Unique Identifier
Name (string) Network Name
Machines ([]ProjectMachine) Machine List
CMachines ([]ProjectCloudMachine) Cloud Machine List
Installations ([]InstallationPlan) Machine Installation Plans
Options ([][]string) Specific Network information (eg. cloud provider info or local info)
func (*MachineNetwork) Import ¶
func (element *MachineNetwork) Import(file string, format string) error
func (*MachineNetwork) Load ¶
func (element *MachineNetwork) Load(file string) error
func (*MachineNetwork) PostImport ¶
func (element *MachineNetwork) PostImport() error
func (*MachineNetwork) Save ¶
func (element *MachineNetwork) Save(file string) error
func (*MachineNetwork) Validate ¶
func (element *MachineNetwork) Validate() []error
type MachineRole ¶
type MachineRole string
Describe System Role Enum
StandAlone StandAlone Machine Unit
Master Master Machine in a cluster
Slave Dependant Machine in a cluster
ClusterMember Peer Role in a cluster
const ( StandAloneRole MachineRole = "Stand-Alone" MasterRole MachineRole = "Master" SlaveRole MachineRole = "Slave" ClusterMemberRole MachineRole = "Cluster-Memeber" )
type Network ¶
type Network struct { Id string `json:"Id" xml:"Id"` Name string `json:"Name" xml:"Name"` LocalInstances []LocalInstance `json:"LocalInstances" xml:"LocalInstances"` CloudInstances []CloudInstance `json:"CloudInstances" xml:"CloudInstances"` Installations []Installation `json:"Installations" xml:"Installations"` Options [][]string `json:"Options" xml:"Options"` }
Describe Network options, contains
Id (string) Unique Identifier
Name (string) Network Name
Instances ([]Instance) Instances List
CInstances ([]CloudInstance) Cloud Instances List
Installations ([]Installation) Machine Executed Installations
Options ([][]string) Specific Network information (eg. cloud provider info or local info)
func (*Network) PostImport ¶
type NetworkState ¶
type NetworkState struct { Id string `json:"Id" xml:"Id"` NetworkId string `json:"NetworkId" xml:"NetworkId"` DomainId string `json:"DomainId" xml:"DomainId"` InstanceStates []InstanceState `json:"InstanceStates" xml:"InstanceStates"` Creation time.Time `json:"Creation" xml:"Creation"` Modified time.Time `json:"Modified" xml:"Modified"` Created bool `json:"Created" xml:"Created"` Altered bool `json:"Altered" xml:"Altered"` Errors bool `json:"Errors" xml:"Errors"` LastMessage string `json:"LastMessage" xml:"LastMessage"` }
Describe Network State, contains
Id (string) State Unique Identifier
NetworkId (string) Target Network Id
DomainId (string) Target Domain Id
InstanceStates ([]MachineState) List Of Instance States
Creation (time.Time ) Creation Date
Modified (time.Time ) Last Modification Date
Created (bool) Creation State
Altered (bool) Alteration State
Errors (bool) Error State
LastMessage (string) Last Alternation Message
func (*NetworkState) Load ¶
func (element *NetworkState) Load(file string) error
func (*NetworkState) PostImport ¶
func (element *NetworkState) PostImport() error
func (*NetworkState) Save ¶
func (element *NetworkState) Save(file string) error
func (*NetworkState) Validate ¶
func (element *NetworkState) Validate() []error
type Project ¶
type Project struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Project Name" type:"text"` Open bool `json:"Open" xml:"Open" mandatory:"no" descr:"Writable State" type:"boolean"` Domains []MachineDomain `json:"Domains" xml:"Domains" mandatory:"yes" descr:"List Of Domains" type:"object Domains list"` Created time.Time `json:"Created" xml:"Created" mandatory:"no" descr:"Creation Date" type:"datetime"` Modified time.Time `json:"Modified" xml:"Modified" mandatory:"no" descr:"Last Modification Date" type:"datetime"` Errors bool `json:"Errors" xml:"Errors" mandatory:"no" descr:"Error State" type:"boolean"` LastMessage string `json:"LastMessage" xml:"LastMessage" mandatory:"no" descr:"Last Alternation Message" type:"text"` }
Describe Project, contains
Id (string) Unique Identifier
Name (string) Project Name
Open (bool) Writable State
Domains ([]ProjectDomain) List Of Domains
Created (time.Time ) Creation Date
Modified (time.Time ) Last Modification Date
Errors (bool) Error State
LastMessage (string) Last Alternation Message
func ProjectFromImport ¶
func ProjectFromImport(imported ProjectImport) Project
func (*Project) PostImport ¶
type ProjectEngineOpt ¶
type ProjectEngineOpt struct { Environment []string `json:"Environment" xml:"Environment" mandatory:"no" descr:"Environment variables" type:"text list"` InsecureRegistry []string `json:"InsecureRegistry" xml:"InsecureRegistry" mandatory:"no" descr:"Insecure Registry Options" type:"text list"` RegistryMirror []string `json:"RegistryMirror" xml:"RegistryMirror" mandatory:"no" descr:"Registry Mirror Options" type:"text list"` StorageDriver string `json:"StorageDriver" xml:"StorageDriver" mandatory:"no" descr:"Storage Driver" type:"text"` InstallURL string `json:"InstallURL" xml:"InstallURL" mandatory:"no" descr:"Docker Install URL (e.g.: https://get.docker.com)" type:"text"` Labels []string `json:"Labels" xml:"Labels" mandatory:"no" descr:"Engine Labels" type:"text list"` Options []string `json:"Options" xml:"Options" mandatory:"no" descr:"Engine Options" type:"text list"` }
Describe Docker Engine options, contains
Environment ([]string) Environment variables
InsecureRegistry ([]string) Insecure Registry Options
RegistryMirror ([]string) Registry Mirror Options
StorageDriver (string) Storage Driver
InstallURL (string) Docker Install URL (e.g.: https://get.docker.com)
Labels ([]string) Engine Labels
Options ([]string) Engine Options
func ToMachineEngineOpt ¶
func ToMachineEngineOpt(opt EngineOpt) ProjectEngineOpt
type ProjectImport ¶
type ProjectImport struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Project Name" type:"text"` Domains []MachineDomain `json:"Domains" xml:"Domains" mandatory:"yes" descr:"List Of Domains" type:"object Domains list"` }
Describe Project Import Model, contains
Id (string) Unique Identifier
Name (string) Project Name
Domains ([]ProjectDomain) List Of Domains
func ProjectToImport ¶
func ProjectToImport(project Project) ProjectImport
func (*ProjectImport) Import ¶
func (element *ProjectImport) Import(file string, format string) error
func (*ProjectImport) PostImport ¶
func (element *ProjectImport) PostImport() error
func (*ProjectImport) Validate ¶
func (element *ProjectImport) Validate() []error
type ProjectSwarmOpt ¶
type ProjectSwarmOpt struct { Enabled bool `json:"Enabled" xml:"Enabled" mandatory:"yes" descr:"Enable Swarm Features" type:"boolean"` Host string `json:"Host" xml:"Host" mandatory:"no" descr:"Swarm discovery Address (tcp://0.0.0.0:3376)" type:"text"` UseAddress bool `json:"UseAddress" xml:"UseAddress" mandatory:"no" descr:"Use Machine IP Address" type:"boolean"` DiscoveryToken string `json:"DiscoveryToken" xml:"DiscoveryToken" mandatory:"no" descr:"Use Swarm Discovery Option (token://<token>)" type:"text"` UseExperimental bool `json:"UseExperimental" xml:"UseExperimental" mandatory:"no" descr:"Use Docker Experimental Features" type:"boolean"` IsMaster bool `json:"IsMaster" xml:"IsMaster" mandatory:"no" descr:"Is Swarm Master" type:"boolean"` Image string `json:"Image" xml:"Image" mandatory:"no" descr:"Swarm Image (e.g.: smarm:latest)" type:"text"` JoinOpts []string `json:"JoinOpts" xml:"JoinOpts" mandatory:"no" descr:"Swarm Join Options" type:"text list"` Strategy string `json:"Strategy" xml:"Strategy" mandatory:"no" descr:"Swarm Strategy" type:"text"` TLSSan []string `` /* 164-byte string literal not displayed */ }
Describe Swarm Cluster feature, contains
Enabled (bool) Enable Swarm Features
Host (string) Swarm discovery Address (tcp://0.0.0.0:3376)
UseAddress (bool) Use Machine IP Address
DiscoveryToken (bool) Use Swarm Discovery Option (token://<token>)
UseExperimental (bool) Use Docker Experimental Features
IsMaster (bool) Is Swarm Master
Image (string) Swarm Image (e.g.: smarm:latest)
JoinOpts ([]string) Swarm Join Options
Strategy (string) Swarm Strategy
TLSSan ([]string) Swarm TLS Specific Options (No overwrite, be sure of syntax, eg: ["--my-tls-key my-tls-value"])
func ToMachineSwarmOpt ¶
func ToMachineSwarmOpt(opt SwarmOpt) ProjectSwarmOpt
type ProjectsDescriptor ¶
type ProjectsDescriptor struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Project Unique Identifier" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Project Name" type:"text"` InfraId string `json:"InfraId" xml:"InfraId" mandatory:"yes" descr:"Infrastructure Unique Identifier" type:"text"` InfraName string `json:"InfraName" xml:"InfraName" mandatory:"yes" descr:"Infrastructure Project Name" type:"text"` Active bool `json:"Active" xml:"Active" mandatory:"yes" descr:"Active State of Infrastructure" type:"boolean"` Open bool `json:"Open" xml:"Open" mandatory:"yes" descr:"Project Writable State" type:"boolean"` Synced bool `json:"Synced" xml:"Synced" mandatory:"no" descr:"Sync State of Project" type:"boolean"` }
Describe Project State in Index, contains
Id (string) Project Descriptor Unique Identifier
Name (string) Project Name
InfraId (string) Infrastructure Unique Identifier
InfraName (string) Infrastructure Project Name
Open (bool) Project Writable State
Active (bool) Active State of Infrastructure
Synced (bool) Sync State of Project
func (*ProjectsDescriptor) Import ¶
func (element *ProjectsDescriptor) Import(file string, format string) error
func (*ProjectsDescriptor) Load ¶
func (element *ProjectsDescriptor) Load(file string) error
func (*ProjectsDescriptor) PostImport ¶
func (element *ProjectsDescriptor) PostImport() error
func (*ProjectsDescriptor) Save ¶
func (element *ProjectsDescriptor) Save(file string) error
func (*ProjectsDescriptor) Validate ¶
func (element *ProjectsDescriptor) Validate() []error
type ProjectsIndex ¶
type ProjectsIndex struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Project Unique Identifier" type:"text"` Projects []ProjectsDescriptor `json:"Projects" xml:"Projects" mandatory:"yes" descr:"Projects indexed in VMKube" type:"object Projects list"` }
Describe Projects Index, contains
Id (string) Indexes Unique Identifier
Projects ([]ProjectsDescriptor) Projects indexed in VMKube
func (*ProjectsIndex) Import ¶
func (element *ProjectsIndex) Import(file string, format string) error
func (*ProjectsIndex) Load ¶
func (element *ProjectsIndex) Load(file string) error
func (*ProjectsIndex) PostImport ¶
func (element *ProjectsIndex) PostImport() error
func (*ProjectsIndex) Save ¶
func (element *ProjectsIndex) Save(file string) error
func (*ProjectsIndex) Validate ¶
func (element *ProjectsIndex) Validate() []error
type RoleType ¶
type RoleType int
Describe Role Type Enum
StandAlone StandAlone Machine Unit
Master Master Machine in a cluster
Slave Dependant Machine in a cluster
ClusterMember Peer Role in a cluster
func ToInstanceRole ¶
func ToInstanceRole(role MachineRole) RoleType
type State ¶
type State struct { Id string `json:"Id" xml:"Id"` DomainStates []DomainState `json:"DomainStates" xml:"DomainStates"` Creation time.Time `json:"Creation" xml:"Creation"` Modified time.Time `json:"Modified" xml:"Modified"` Created bool `json:"Created" xml:"Created"` Altered bool `json:"Altered" xml:"Altered"` Errors bool `json:"Errors" xml:"Errors"` LastMessage string `json:"LastMessage" xml:"LastMessage"` }
Describe State, contains
Id (string) State Unique Identifier
DomainStates ([]DomainState) List Of Domain States
Creation (time.Time ) Creation Date
Modified (time.Time ) Last Modification Date
Created (bool) Creation State
Altered (bool) Alteration State
Errors (bool) Error State
LastMessage (string) Last Alternation Message
func (*State) PostImport ¶
type SwarmOpt ¶
type SwarmOpt struct { Enabled bool `json:"Enabled" xml:"Enabled"` Host string `json:"Host" xml:"Host"` UseAddress bool `json:"UseAddress" xml:"UseAddress"` DiscoveryToken string `json:"DiscoveryToken" xml:"DiscoveryToken"` UseExperimental bool `json:"UseExperimental" xml:"UseExperimental"` IsMaster bool `json:"IsMaster" xml:"IsMaster"` Image string `json:"Image" xml:"Image"` JoinOpts []string `json:"JoinOpts" xml:"JoinOpts"` Strategy string `json:"Strategy" xml:"Strategy"` TLSSan []string `json:"TLSSan" xml:"TLSSan"` }
Describe Swarm Cluster feature, contains
Enabled (bool) Enable Swarm Features
Host (string) Swarm discovery Address (tcp://0.0.0.0:3376)
UseAddress (bool) Use Machine IP Address
DiscoveryToken (bool) Use Swarm Discovery Option (token://<token>)
UseExperimental (bool) Use Docker Experimental Features
IsMaster (bool) Is Swarm Master
Image (string) Swarm Image (e.g.: smarm:latest)
JoinOpts ([]string) Swarm Join Options
Strategy (string) Swarm Strategy
TLSSan ([]string) Swarm TLS Specific Options (No overwrite, be sure of syntax)
func ToInstanceSwarmOpt ¶
func ToInstanceSwarmOpt(opt ProjectSwarmOpt) SwarmOpt