project

package
v0.0.0-...-ea498fe Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when queried project does not exist
	ErrNotFound = errors.New("Project not found")

	// ErrDuplicate is returned when adding duplicate project
	ErrDuplicate = errors.New("Duplicate project")
)

Functions

This section is empty.

Types

type Attributes

type Attributes interface {
	Name() string
	Description() string
	Script() string
}

Attributes represents the configuration of a single project

type Config

type Config struct {
	URL    string `hcl:"url"`
	Type   string `hcl:"type"`
	Config string `hcl:"config"`
}

Config is the initial configuration for project.

type Container

type Container interface {
	Projects() []string
	Project(string) (Project, error)
	Add(project Project) error
}

Container is the project manager

func NewContainer

func NewContainer() Container

NewContainer creates a new project manager

func NewStaticContainer

func NewStaticContainer(p Project) Container

NewStaticContainer returns a container with a project for testing

type Manager

type Manager interface {
	VCS() string
	URL() string
	Config() string
	ID() string
	Err() error
}

Manager represents the manager of a single project

type Project

type Project interface {
	Manager
	Attributes
}

Project represents a single managed project

func New

func New(VCS string, URL string, repoID string, filename string, config []byte) (Project, error)

New creates a new project from configuration string

func NewStaticProject

func NewStaticProject(id string) Project

NewStaticProject returns a new project based on static data

Jump to

Keyboard shortcuts

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