dockership: github.com/mcuadros/dockership/core Index | Files

package core

import "github.com/mcuadros/dockership/core"

Index

Package Files

docker.go docker_group.go dockerfile.go etcd.go events.go github.go logger.go project.go types.go

Constants

const DefaultBranch = "master"
const LatestTag = "latest"

func Critical Uses

func Critical(ctx ...interface{})

func Debug Uses

func Debug(ctx ...interface{})

func Error Uses

func Error(ctx ...interface{})

func Info Uses

func Info(ctx ...interface{})

func Warning Uses

func Warning(ctx ...interface{})

type Commit Uses

type Commit string

type Container Uses

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

func (*Container) BelongsTo Uses

func (c *Container) BelongsTo(p *Project) bool

func (*Container) GetPortsString Uses

func (c *Container) GetPortsString() string

func (*Container) GetShortID Uses

func (c *Container) GetShortID() string

func (*Container) IsRunning Uses

func (c *Container) IsRunning() bool

type ContainersByCreated Uses

type ContainersByCreated []*Container

func (ContainersByCreated) Len Uses

func (c ContainersByCreated) Len() int

func (ContainersByCreated) Less Uses

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

func (ContainersByCreated) Swap Uses

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

type Docker Uses

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

func NewDocker Uses

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

func (*Docker) BuildImage Uses

func (d *Docker) BuildImage(
    p *Project, rev Revision, dockerfile *Dockerfile, output io.Writer,
) error

func (*Docker) Clean Uses

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

func (*Docker) Deploy Uses

func (d *Docker) Deploy(p *Project, rev Revision, dockerfile *Dockerfile, output io.Writer, force bool) error

func (*Docker) ListContainers Uses

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

func (*Docker) ListImages Uses

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

func (*Docker) Run Uses

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

type DockerGroup Uses

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

func NewDockerGroup Uses

func NewDockerGroup(environment *Environment) (*DockerGroup, error)

func (*DockerGroup) BuildImage Uses

func (d *DockerGroup) BuildImage(p *Project, rev Revision, dockerfile *Dockerfile, output io.Writer) []error

func (*DockerGroup) Clean Uses

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

func (*DockerGroup) Deploy Uses

func (d *DockerGroup) Deploy(p *Project, rev Revision, dockerfile *Dockerfile, output io.Writer, force bool) []error

func (*DockerGroup) ListContainers Uses

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

func (*DockerGroup) ListImages Uses

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

func (*DockerGroup) Run Uses

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

type Dockerfile Uses

type Dockerfile struct {
    Files []*File
    // contains filtered or unexported fields
}

func NewDockerfile Uses

func NewDockerfile(content []byte, p *Project, r Revision, e *Environment) *Dockerfile

func (*Dockerfile) Get Uses

func (d *Dockerfile) Get() []byte

type Environment Uses

type Environment struct {
    DockerEndPoints []string `gcfg:"DockerEndPoint"`
    CertPath        string   `json:"-"`
    EtcdServers     []string `gcfg:"EtcdServer"`
    Name            string
    Host            string `gcfg:"Host"`
}

func (*Environment) String Uses

func (e *Environment) String() string

type Etcd Uses

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

func NewEtcd Uses

func NewEtcd(endPoints []string) (*Etcd, error)

func (*Etcd) Get Uses

func (e *Etcd) Get(key string) (string, error)

type Event Uses

type Event string
var (
    EventDebug    Event = "log.debug"
    EventInfo     Event = "log.info"
    EventWarning  Event = "log.warning"
    EventError    Event = "log.error"
    EventCritical Event = "log.critical"
)

type EventManager Uses

type EventManager struct {
    sync.Mutex
    // contains filtered or unexported fields
}
var Events *EventManager

func NewEventManager Uses

func NewEventManager() *EventManager

func (*EventManager) Has Uses

func (m *EventManager) Has(e Event, s *Subscriber) int

func (*EventManager) Subscribe Uses

func (m *EventManager) Subscribe(e Event, s *Subscriber)

func (*EventManager) Trigger Uses

func (m *EventManager) Trigger(e Event, ctx ...interface{})

func (*EventManager) Unsubscribe Uses

func (m *EventManager) Unsubscribe(e Event, s *Subscriber)

type File Uses

type File struct {
    Name    string
    Content []byte
}

type Github Uses

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

func NewGithub Uses

func NewGithub(token string) *Github

func (*Github) GetDockerFile Uses

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

func (*Github) GetFiles Uses

func (g *Github) GetFiles(p *Project) (files []*File, err error)

func (*Github) GetLastCommit Uses

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

func (*Github) GetLastRevision Uses

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

type Image Uses

type Image struct {
    DockerEndPoint string
    docker.APIImages
}

func (Image) BelongsTo Uses

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

func (Image) GetRepoTagsAsImageID Uses

func (i Image) GetRepoTagsAsImageID() []ImageID

type ImageID Uses

type ImageID string

func (ImageID) BelongsTo Uses

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

func (ImageID) GetProjectString Uses

func (i ImageID) GetProjectString() string

func (ImageID) GetRevisionString Uses

func (i ImageID) GetRevisionString() string

func (ImageID) IsRevision Uses

func (i ImageID) IsRevision(rev Revision) bool

type ImagesByCreated Uses

type ImagesByCreated []*Image

func (ImagesByCreated) Len Uses

func (c ImagesByCreated) Len() int

func (ImagesByCreated) Less Uses

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

func (ImagesByCreated) Swap Uses

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

func (*Link) String Uses

func (l *Link) String() string

type LinkDefinition Uses

type LinkDefinition string

func (LinkDefinition) GetAlias Uses

func (l LinkDefinition) GetAlias() string

func (LinkDefinition) GetProjectName Uses

func (l LinkDefinition) GetProjectName() string

type Project Uses

type Project struct {
    Name                string
    Repository          VCS
    RelatedRepositories []VCS    `gcfg:"RelatedRepository"`
    Dockerfile          string   `default:"Dockerfile"`
    GithubToken         string   `json:"-"`
    History             int      `default:"3"`
    UseShortRevisions   bool     `default:"true"`
    Files               []string `gcfg:"File"`
    TestCommand         string
    NoCache             bool
    Restart             string
    Ports               []string         `gcfg:"Port"`
    Binds               []string         `gcfg:"Volume"`
    VolumesFrom         []string         `gcfg:"VolumeFrom"`
    Links               map[string]*Link `json:"-"`
    LinkNames           []LinkDefinition `gcfg:"Link"`
    LinkedBy            []*Project       `json:"-"`
    Environments        map[string]*Environment
    EnvironmentNames    []string `gcfg:"Environment"`
    TaskStatus          TaskStatus
    WebHook             string `gcfg:"WebHook"`
}

func (*Project) Deploy Uses

func (p *Project) Deploy(environment string, output io.Writer, force bool) []error

func (*Project) ListContainers Uses

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

func (*Project) ListImages Uses

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

func (*Project) Status Uses

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

func (*Project) StatusByEnvironment Uses

func (p *Project) StatusByEnvironment(e *Environment) (*ProjectStatus, []error)

func (*Project) String Uses

func (p *Project) String() string

func (*Project) Test Uses

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

type ProjectDeployResult Uses

type ProjectDeployResult struct {
    *command.ExecutionResponse
}

type ProjectStatus Uses

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

type Revision Uses

type Revision map[VCS]Commit

func (Revision) Get Uses

func (r Revision) Get() string

func (Revision) GetShort Uses

func (r Revision) GetShort() string

func (Revision) String Uses

func (r Revision) String() string

type Subscriber Uses

type Subscriber struct {
    Handler func(...interface{})
}

type Task Uses

type Task string
const (
    Deploy Task = "deploy"
)

type TaskStatus Uses

type TaskStatus map[string]map[Task]time.Time

func (TaskStatus) Start Uses

func (ts TaskStatus) Start(e *Environment, t Task)

func (TaskStatus) Stop Uses

func (ts TaskStatus) Stop(e *Environment, t Task)

type VCS Uses

type VCS string

func (VCS) Info Uses

func (v VCS) Info() *VCSInfo

func (VCS) IsValid Uses

func (v VCS) IsValid() bool

type VCSInfo Uses

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

Package core imports 21 packages (graph) and is imported by 14 packages. Updated 2016-07-16. Refresh now. Tools for package owners.