definitions

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2015 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllDappTypes

func AllDappTypes() map[string]*DappType

Types

type Action

type Action struct {
	// name of the action
	Name string `json:"name" yaml:"name" toml:"name"`
	// an array of strings listing the services which eris should start prior
	// to running the steps required for the action
	Dependencies *Dependencies `json:"dependencies" yaml:"dependencies" toml:"dependencies"`
	// a chain which should be started by eris prior to running the steps
	// required for the action. can take a `$chain` string which would then
	// be passed in via a command line flag
	Chain string `json:"chain" yaml:"chain" toml:"chain"`
	// an array of strings which should be ran in a sequence of subshells
	Steps []string `json:"steps" yaml:"steps" toml:"steps"`
	// environment variables to give the subshells
	Environment map[string]string `json:"environment" yaml:"environment" toml:"environment"`

	Maintainer *Maintainer `json:"maintainer,omitempty" yaml:"maintainer,omitempty" toml:"maintainer,omitempty"`
	Location   *Location   `json:"location,omitempty" yaml:"location,omitempty" toml:"location,omitempty"`
	Machine    *Machine    `json:"machine,omitempty" yaml:"machine,omitempty" toml:"machine,omitempty"`
	Srvs       []*Service
	Operations *Operation
}

func BlankAction

func BlankAction() *Action

type Chain

type Chain struct {
	// name of the chain
	Name string `json:"name" yaml:"name" toml:"name"`
	// chain_id of the chain
	ChainID string `mapstructure:"chain_id" json:"chain_id" yaml:"chain_id" toml:"chain_id"`
	// type of the chain
	ChainType string `mapstructure:"chain_type" json:"chain_type" yaml:"chain_type" toml:"chain_type"`

	// same fields as in the Service Struct/Service Specification
	Service      *Service      `json:"service,omitempty" yaml:"service,omitempty" toml:"service,omitempty"`
	Dependencies *Dependencies `json:"dependencies,omitempty" yaml:"dependencies,omitempty" toml:"dependencies,omitempty"`
	Maintainer   *Maintainer   `json:"maintainer,omitempty" yaml:"maintainer,omitempty" toml:"maintainer,omitempty"`
	Location     *Location     `json:"location,omitempty" yaml:"location,omitempty" toml:"location,omitempty"`
	Machine      *Machine      `json:"machine,omitempty" yaml:"machine,omitempty" toml:"machine,omitempty"`
	Operations   *Operation
}

func BlankChain

func BlankChain() *Chain

type Contracts

type Contracts struct {
	// TODO: harmonize with dapps_definition_spec.md
	Name         string            `json:"name" yaml:"name" toml:"name"`
	PackageID    string            `json:"package_id" yaml:"package_id" toml:"package_id"`
	Environment  map[string]string `json:"environment" yaml:"environment" toml:"environment"`
	Dependencies *Dependencies     `json:"dependencies" yaml:"dependencies" toml:"dependencies"`
	ChainName    string            `json:"chain_name" yaml:"chain_name" toml:"chain_name"`
	ChainID      string            `mapstructure:"chain_id" json:"chain_id" yaml:"chain_id" toml:"chain_id"`
	ChainTypes   []string          `mapstructure:"chain_types" json:"chain_types" yaml:"chain_types" toml:"chain_types"`
	TestType     string            `mapstructure:"test_type" json:"test_type" yaml:"test_type" toml:"test_type"`
	DeployType   string            `mapstructure:"deploy_type" json:"deploy_type" yaml:"deploy_type" toml:"deploy_type"`
	TestTask     string            `mapstructure:"test_task" json:"test_task" yaml:"test_task" toml:"test_task"`
	DeployTask   string            `mapstructure:"deploy_task" json:"deploy_task" yaml:"deploy_task" toml:"deploy_task"`

	Maintainer *Maintainer `json:"maintainer,omitempty" yaml:"maintainer,omitempty" toml:"maintainer,omitempty"`
	Location   *Location   `json:"location,omitempty" yaml:"location,omitempty" toml:"location,omitempty"`
	Machine    *Machine    `json:"machine,omitempty" yaml:"machine,omitempty" toml:"machine,omitempty"`
	DappType   *DappType
	Chain      *Chain
	Srvs       []*Service
	Operations *Operation
}

func BlankContracts

func BlankContracts() *Contracts

type DappType

type DappType struct {
	Name       string
	BaseImage  string
	DeployCmd  string
	TestCmd    string
	EntryPoint string
	ChainTypes []string
}

func BlankDappType

func BlankDappType() *DappType

func EmbarkDapp

func EmbarkDapp() *DappType

func GulpDapp

func GulpDapp() *DappType

func PyEpmDapp

func PyEpmDapp() *DappType

func SUnitDapp

func SUnitDapp() *DappType

type Dependencies added in v0.10.2

type Dependencies struct {
	Chains   []string `json:"chains,omitempty" yaml:"chains,omitempty" toml:"chains,omitempty"`
	Services []string `json:"services,omitempty" yaml:"services,omitempty" toml:"services,omitempty"`
}

type Do

type Do struct {
	AddDir        bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Actions       bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Force         bool     `mapstructure:"," json:"," yaml:"," toml:","`
	File          bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Interactive   bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Pull          bool     `mapstructure:"," json:"," yaml:"," toml:","`
	SkipPull      bool     `mapstructure:"," json:"," yaml:"," toml:","`
	SkipImages    bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Quiet         bool     `mapstructure:"," json:"," yaml:"," toml:","`
	All           bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Follow        bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Run           bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Rm            bool     `mapstructure:"," json:"," yaml:"," toml:","`
	RmD           bool     `mapstructure:"," json:"," yaml:"," toml:","`
	RmHF          bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Services      bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Tool          bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Verbose       bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Debug         bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Yes           bool     `mapstructure:"," json:"," yaml:"," toml:","`
	Lines         int      `mapstructure:"," json:"," yaml:"," toml:","` // XXX: for tail and logs
	Timeout       uint     `mapstructure:"," json:"," yaml:"," toml:","`
	N             uint     `mapstructure:"," json:"," yaml:"," toml:","`
	Pubkey        string   `mapstructure:"," json:"," yaml:"," toml:","`
	Type          string   `mapstructure:"," json:"," yaml:"," toml:","`
	Task          string   `mapstructure:"," json:"," yaml:"," toml:","`
	Tail          string   `mapstructure:"," json:"," yaml:"," toml:","`
	Branch        string   `mapstructure:"," json:"," yaml:"," toml:","`
	ChainName     string   `mapstructure:"," json:"," yaml:"," toml:","`
	GenesisFile   string   `mapstructure:"," json:"," yaml:"," toml:","`
	ConfigFile    string   `mapstructure:"," json:"," yaml:"," toml:","`
	ServerConf    string   `mapstructure:"," json:"," yaml:"," toml:","`
	ChainID       string   `mapstructure:"," json:"," yaml:"," toml:","`
	Hash          string   `mapstructure:"," json:"," yaml:"," toml:","`
	Gateway       string   `mapstructure:"," json:"," yaml:"," toml:","`
	MachineName   string   `mapstructure:"," json:"," yaml:"," toml:","`
	Name          string   `mapstructure:"," json:"," yaml:"," toml:","`
	Path          string   `mapstructure:"," json:"," yaml:"," toml:","`
	CSV           string   `mapstructure:"," json:"," yaml:"," toml:","`
	NewName       string   `mapstructure:"," json:"," yaml:"," toml:","`
	ResultFormt   string   `mapstructure:"," json:"," yaml:"," toml:","`
	Priv          string   `mapstructure:"," json:"," yaml:"," toml:","`
	ServicesSlice []string `mapstructure:"," json:"," yaml:"," toml:","`
	ConfigOpts    []string `mapstructure:"," json:"," yaml:"," toml:","`

	// Generalized string slice
	Args []string `mapstructure:"," json:"," yaml:"," toml:","`

	// <key>=<value> pairs
	Env []string `mapstructure:"," json:"," yaml:"," toml:","`

	// <container_name>:<internal_name> pairs
	Links []string `mapstructure:"," json:"," yaml:"," toml:","`

	// Objects
	Action            *Action
	Chain             *Chain
	Operations        *Operation
	Service           *Service
	ServiceDefinition *ServiceDefinition

	// Return
	Result string
}

func NowDo

func NowDo() *Do

type Location

type Location struct {
	Repository string `json:"repository,omitempty" yaml:"repository,omitempty" toml:"repository,omitempty"`
	IPFSHash   string `json:"ipfs_hash,omitempty" yaml:"ipfs_hash,omitempty" toml:"ipfs_hash,omitempty"`
}

func BlankLocation

func BlankLocation() *Location

type Machine

type Machine struct {
	Requires []string `json:"requires,omitempty" yaml:"requires,omitempty" toml:"requires,omitempty"`
}

func BlankMachine

func BlankMachine() *Machine

type Maintainer

type Maintainer struct {
	Name  string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
	Email string `json:"email,omitempty" yaml:"email,omitempty" toml:"email,omitempty"`
}

func BlankMaintainer

func BlankMaintainer() *Maintainer

type Operation

type Operation struct {
	// Filled in dynamically prerun
	SrvContainerName  string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	SrvContainerID    string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	DataContainerName string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	DataContainerID   string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	ContainerNumber   int               `json:",omitempty,omitzero" yaml:",omitempty" toml:",omitempty,omitzero"`
	Restart           string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	Remove            bool              `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	Privileged        bool              `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	Attach            bool              `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	AppName           string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	DockerHostConn    string            `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	Labels            map[string]string `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	PublishAllPorts   bool              `json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	CapAdd            []string          `mapstructure:",omitempty", json:",omitempty" yaml:",omitempty" toml:",omitempty"`
	CapDrop           []string          `mapstructure:",omitempty", json:",omitempty" yaml:",omitempty" toml:",omitempty"`
}

func BlankOperation

func BlankOperation() *Operation

type Package

type Package struct {
	Name      string     `json:"name" yaml:"name" toml:"name"`
	Contracts *Contracts `mapstructure:"eris" json:"eris" yaml:"eris" toml:"eris"`
}

func BlankPackage

func BlankPackage() *Package

type Service

type Service struct {
	// name of the service
	Name string `json:"name" yaml:"name" toml:"name"`
	// docker image used by the service
	Image string `json:"image,omitempty" yaml:"image,omitempty" toml:"image,omitempty"`
	// whether eris should automagically handle a data container for this service
	AutoData bool `json:"data_container" yaml:"data_container" toml:"data_container"`
	// maps directly to docker cmd
	Command string `json:"command,omitempty" yaml:"command,omitempty" toml:"command,omitempty"`
	// maps directly to docker links
	Links []string `mapstructure:"links" json:"links,omitempty" yaml:"links,omitempty" toml:"links,omitempty"`
	// maps directly to docker ports
	Ports []string `mapstructure:"ports" json:"ports,omitempty" yaml:"ports,omitempty" toml:"ports,omitempty"`
	// maps directly do docker expose
	Expose []string `mapstructure:"expose" json:"expose,omitempty" yaml:"expose,omitempty" toml:"expose,omitempty"`
	// maps directly to docker volumes
	Volumes []string `mapstructure:"volumes" json:"volumes,omitempty" yaml:"volumes,omitempty" toml:"volumes,omitempty"`
	// maps directly to docker volumes-from
	VolumesFrom []string `mapstructure:"volumes_from" json:"volumes_from,omitempty" yaml:"volumes_from,omitempty" toml:"volumes_from,omitempty"`
	// maps directly to docker environment
	Environment []string `json:"environment,omitempty" yaml:"environment,omitempty" toml:"environment,omitempty"`
	// maps directly to docker env-file
	EnvFile []string `mapstructure:"env_file" json:"env_file,omitempty" yaml:"env_file,omitempty" toml:"env_file,omitempty"`
	// maps directly to docker net
	Net string `json:"net,omitempty" yaml:"net,omitempty" toml:"net,omitempty"`
	// maps directly to docker PID
	PID string `json:"pid,omitempty" yaml:"pid,omitempty" toml:"pid,omitempty"`
	// maps directly to docker DNS
	DNS []string `mapstructure:"dns" json:"dns,omitempty" yaml:"dns,omitempty" toml:"dns,omitempty"`
	// maps directly to docker DNS-search
	DNSSearch []string `mapstructure:"dns_search" json:"dns_search,omitempty" yaml:"dns_search,omitempty" toml:"dns_search,omitempty"`
	// maps directly to docker workdir
	WorkDir string `mapstructure:"work_dir" json:"work_dir,omitempty" yaml:"work_dir,omitempty" toml:"work_dir,omitempty"`
	// maps directly to docker entrypoint
	EntryPoint string `mapstructure:"entry_point" json:"entry_point,omitempty" yaml:"entry_point,omitempty" toml:"entry_point,omitempty"`
	// maps directly to docker hostname
	HostName string `mapstructure:"host_name" json:"host_name,omitempty" yaml:"host_name,omitempty" toml:"host_name,omitempty"`
	// maps directly to docker domainname
	DomainName string `mapstructure:"domain_name" json:"domain_name,omitempty" yaml:"domain_name,omitempty" toml:"domain_name,omitempty"`
	// maps directly to docker username
	User string `json:"user,omitempty" yaml:"user,omitempty" toml:"user,omitempty"`
	// maps directly to docker cpu_shares
	CPUShares int64 `` /* 127-byte string literal not displayed */
	// maps directly to docker mem_limit
	MemLimit int64 `mapstructure:"mem_limit" json:"memory,omitempty,omitzero" yaml:"memory,omitempty" toml:"memory,omitempty,omitzero"`
}

func BlankService

func BlankService() *Service

type ServiceDefinition

type ServiceDefinition struct {
	// name of the service
	Name string `json:"name" yaml:"name" toml:"name"`
	// id of the service
	ServiceID string `mapstructure:"service_id,omitempty" json:"service_id,omitempty" yaml:"service_id,omitempty" toml:"service_id,omitempty"`
	// a chain which must be started prior to this service starting. can take a `$chain` string
	// which would then be passed in via a command line flag
	Chain string `json:"chain,omitempty" yaml:"chain,omitempty" toml:"chain,omitempty"`

	Service      *Service      `json:"service" yaml:"service" toml:"service"`
	Dependencies *Dependencies `json:"dependencies,omitempty", yaml:"dependencies,omitempty" toml:"dependencies,omitempty"`
	Maintainer   *Maintainer   `json:"maintainer,omitempty" yaml:"maintainer,omitempty" toml:"maintainer,omitempty"`
	Location     *Location     `json:"location,omitempty" yaml:"location,omitempty" toml:"location,omitempty"`
	Machine      *Machine      `json:"machine,omitempty" yaml:"machine,omitempty" toml:"machine,omitempty"`
	Srvs         []*Service
	Operations   *Operation
}

func BlankServiceDefinition

func BlankServiceDefinition() *ServiceDefinition

Jump to

Keyboard shortcuts

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