projects

package
v1.0.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrProjectNotFound happens when a project.json is not found
	ErrProjectNotFound = errors.New("Project not found")

	// ErrProjectAlreadyExists happens when a Project ID already exists
	ErrProjectAlreadyExists = errors.New("Project already exists")

	// ErrInvalidProjectID happens when a Project ID is invalid
	ErrInvalidProjectID = errors.New("Invalid project ID")
)

Functions

func Create

func Create(filename string) error

Create a project on WeDeploy

func Restart

func Restart(id string)

Restart restarts a project

func SetAuth

func SetAuth(id, filename string) error

SetAuth sets a project authentication permissions

func Unlink(projectID string) error

Unlink project

func Validate

func Validate(projectID string) (err error)

Validate project

func ValidateOrCreate

func ValidateOrCreate(filename string) (created bool, err error)

ValidateOrCreate project

Types

type Project

type Project struct {
	ID           string                `json:"id"`
	Name         string                `json:"name"`
	CustomDomain string                `json:"custom_domain,omitempty"`
	Health       string                `json:"health,omitempty"`
	Description  string                `json:"description,omitempty"`
	Containers   containers.Containers `json:"containers,omitempty"`
}

Project structure

func Get

func Get(id string) (project Project, err error)

Get project by ID

func List

func List() (list []Project, err error)

List projects

func Read

func Read(path string) (*Project, error)

Read a project directory properties (defined by a project.json on it)

Jump to

Keyboard shortcuts

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