projects

package
v1.0.0-alpha-64 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2016 License: MIT Imports: 13 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 CreateFromJSON

func CreateFromJSON(ctx context.Context, filename string) error

CreateFromJSON a project on WeDeploy

func Restart

func Restart(ctx context.Context, id string) error

Restart restarts a project

func Unlink(ctx context.Context, projectID string) error

Unlink project

func Validate

func Validate(ctx context.Context, projectID string) (err error)

Validate project

func ValidateOrCreate

func ValidateOrCreate(id string) (fid string, err error)

ValidateOrCreate project

func ValidateOrCreateFromJSON

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

ValidateOrCreateFromJSON project

Types

type Project

type Project struct {
	ID            string                `json:"id"`
	CustomDomains []string              `json:"customDomains,omitempty"`
	Health        string                `json:"health,omitempty"`
	Description   string                `json:"description,omitempty"`
	Containers    containers.Containers `json:"containers,omitempty"`
}

Project structure

func Create

func Create(ctx context.Context, id string) (project *Project, err error)

Create project. If id is empty, a random one is created by the backend

func Get

func Get(ctx context.Context, id string) (project Project, err error)

Get project by ID

func List

func List(ctx context.Context) (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