core

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2014 License: MIT Imports: 21 Imported by: 16

Documentation

Index

Constants

View Source
const DEFAULT_BRANCH = "master"

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit string

type Container

type Container struct {
	DockerEndPoint string
	Image          ImageId
	docker.APIContainers
}

func (*Container) GetPortsString

func (c *Container) GetPortsString() string

func (*Container) GetShortId

func (c *Container) GetShortId() string

func (*Container) IsRunning

func (c *Container) IsRunning() bool

type ContainersByCreated

type ContainersByCreated []*Container

func (ContainersByCreated) Len

func (c ContainersByCreated) Len() int

func (ContainersByCreated) Less

func (c ContainersByCreated) Less(i, j int) bool

func (ContainersByCreated) Swap

func (c ContainersByCreated) Swap(i, j int)

type Docker

type Docker struct {
	// contains filtered or unexported fields
}

func NewDocker

func NewDocker(endPoint string) (*Docker, error)

func (*Docker) BuildImage

func (d *Docker) BuildImage(p *Project, rev Revision, dockerfile []byte) error

func (*Docker) Clean

func (d *Docker) Clean(p *Project) error

func (*Docker) Deploy

func (d *Docker) Deploy(p *Project, rev Revision, dockerfile []byte, force bool) error

func (*Docker) ListContainers

func (d *Docker) ListContainers(p *Project) ([]*Container, error)

func (*Docker) ListImages

func (d *Docker) ListImages(p *Project) ([]*Image, error)

func (*Docker) Run

func (d *Docker) Run(p *Project, rev Revision) error

type DockerGroup

type DockerGroup struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewDockerGroup

func NewDockerGroup(enviroment *Enviroment) (*DockerGroup, error)

func (*DockerGroup) BuildImage

func (d *DockerGroup) BuildImage(p *Project, rev Revision, dockerfile []byte) []error

func (*DockerGroup) Clean

func (d *DockerGroup) Clean(p *Project) []error

func (*DockerGroup) Deploy

func (d *DockerGroup) Deploy(p *Project, rev Revision, dockerfile []byte, force bool) []error

func (*DockerGroup) ListContainers

func (d *DockerGroup) ListContainers(p *Project) ([]*Container, []error)

func (*DockerGroup) ListImages

func (d *DockerGroup) ListImages(p *Project) ([]*Image, []error)

func (*DockerGroup) Run

func (d *DockerGroup) Run(p *Project, rev Revision) []error

type Enviroment

type Enviroment struct {
	DockerEndPoints []string `gcfg:"DockerEndPoint"`
	Name            string
}

func (*Enviroment) String

func (e *Enviroment) String() string

type Github

type Github struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewGithub

func NewGithub(token string) *Github

func (*Github) GetDockerFile

func (g *Github) GetDockerFile(p *Project) (content []byte, err error)

func (*Github) GetLastCommit

func (g *Github) GetLastCommit(p *Project) (Commit, error)

func (*Github) GetLastRevision

func (g *Github) GetLastRevision(p *Project) (Revision, error)

type Image

type Image struct {
	DockerEndPoint string
	docker.APIImages
}

func (Image) BelongsTo

func (i Image) BelongsTo(p *Project) bool

func (Image) GetRepoTagsAsImageId

func (i Image) GetRepoTagsAsImageId() []ImageId

type ImageId

type ImageId string

func (ImageId) BelongsTo

func (i ImageId) BelongsTo(p *Project) bool

func (ImageId) GetProjectString

func (i ImageId) GetProjectString() string

func (ImageId) GetRevisionString

func (i ImageId) GetRevisionString() string

func (ImageId) IsRevision

func (i ImageId) IsRevision(rev Revision) bool

type ImagesByCreated

type ImagesByCreated []*Image

func (ImagesByCreated) Len

func (c ImagesByCreated) Len() int

func (ImagesByCreated) Less

func (c ImagesByCreated) Less(i, j int) bool

func (ImagesByCreated) Swap

func (c ImagesByCreated) Swap(i, j int)
type Link struct {
	Project *Project
	Alias   string
}

func (*Link) String

func (l *Link) String() string

type LinkDefinition

type LinkDefinition string

func (LinkDefinition) GetAlias

func (l LinkDefinition) GetAlias() string

func (LinkDefinition) GetProjectName

func (l LinkDefinition) GetProjectName() string

type Project

type Project struct {
	Name                string
	Repository          VCS
	RelatedRepositories []VCS    `gcfg:"RelatedRepository"`
	Branch              string   `default:"master"`
	Dockerfile          string   `default:"Dockerfile"`
	GithubToken         string   `json:"-"`
	History             int      `default:"3"`
	UseShortRevisions   bool     `default:"true"`
	Files               []string `gcfg:"File"`
	TestCommand         string
	NoCache             bool
	Ports               []string               `gcfg:"Port"`
	Links               map[string]*Link       `json:"-"`
	LinkNames           []LinkDefinition       `gcfg:"Link"`
	LinkedBy            []*Project             `json:"-"`
	Enviroments         map[string]*Enviroment `json:"-"`
	EnviromentNames     []string               `gcfg:"Enviroment"`
}

func (*Project) Deploy

func (p *Project) Deploy(enviroment string, force bool) []error

func (*Project) List

func (p *Project) List() ([]*Container, []error)

func (*Project) Status

func (p *Project) Status() ([]*ProjectStatus, []error)

func (*Project) StatusByEnviroment

func (p *Project) StatusByEnviroment(e *Enviroment) (*ProjectStatus, []error)

func (*Project) String

func (p *Project) String() string

func (*Project) Test

func (p *Project) Test(enviroment string) (*ProjectDeployResult, error)

type ProjectDeployResult

type ProjectDeployResult struct {
	*command.ExecutionResponse
}

type ProjectStatus

type ProjectStatus struct {
	Enviroment        *Enviroment
	LastRevision      Revision
	RunningContainers []*Container
	Containers        []*Container
}

type Revision

type Revision map[VCS]Commit

func (Revision) Get

func (r Revision) Get() string

func (Revision) GetShort

func (r Revision) GetShort() string

func (Revision) String

func (r Revision) String() string

type VCS

type VCS string

func (VCS) Info

func (v VCS) Info() *VCSInfo

func (VCS) IsValid

func (v VCS) IsValid() bool

type VCSInfo

type VCSInfo struct {
	Origin string
	Branch string
	*vcsurl.RepoInfo
}

Jump to

Keyboard shortcuts

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