projects

package
v1.0.0-alpha-131 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: MIT Imports: 8 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")

	// ErrEmptyProjectID happens when trying to access a project, but providing an empty ID
	ErrEmptyProjectID = errors.New("Can not get project: ID is empty")
)

Functions

func Restart

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

Restart restarts a project

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

Unlink project

Types

type Project

type Project struct {
	ProjectID   string `json:"projectId"`
	Health      string `json:"health,omitempty"`
	Description string `json:"description,omitempty"`
	HealthUID   string `json:"healthUid,omitempty"`
}

Project structure

func Create

func Create(ctx context.Context, project Project) (p Project, err error)

Create on the backend

func CreateOrUpdate

func CreateOrUpdate(ctx context.Context, project Project) (pRec Project, created bool, err error)

CreateOrUpdate project

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 Update

func Update(ctx context.Context, project Project) (p Project, err error)

Update project

func (*Project) Services

func (p *Project) Services(ctx context.Context) (services.Services, error)

Services of a given project

Jump to

Keyboard shortcuts

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