Documentation
¶
Index ¶
- Variables
- func AddDomain(ctx context.Context, projectID string, domain string) (err error)
- func RemoveDomain(ctx context.Context, projectID string, domain string) (err error)
- func Restart(ctx context.Context, id string) error
- func Unlink(ctx context.Context, projectID string) error
- type Project
- func Create(ctx context.Context, project Project) (p Project, err error)
- func CreateOrUpdate(ctx context.Context, project Project) (pRec Project, created bool, err error)
- func Get(ctx context.Context, id string) (project Project, err error)
- func List(ctx context.Context) (list []Project, err error)
- func Update(ctx context.Context, project Project) (p Project, err error)
- type ProjectPackage
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 RemoveDomain ¶
RemoveDomain in project
Types ¶
type Project ¶
type Project struct {
ProjectID string `json:"projectId"`
CustomDomains []string `json:"customDomains,omitempty"`
Health string `json:"health,omitempty"`
HomeService string `json:"homeService,omitempty"`
Description string `json:"description,omitempty"`
}
Project structure
func CreateOrUpdate ¶
CreateOrUpdate project
func (*Project) Services ¶
func (p *Project) Services(ctx context.Context) (containers.Containers, error)
Services of a given project
type ProjectPackage ¶
type ProjectPackage struct {
ID string `json:"id"`
CustomDomains []string `json:"customDomains,omitempty"`
HomeService string `json:"homeService,omitempty"`
}
ProjectPackage is the structure for project.json
func Read ¶
func Read(path string) (*ProjectPackage, error)
Read a project directory properties (defined by a project.json on it)
func (ProjectPackage) Project ¶
func (pp ProjectPackage) Project() Project
Project returns a Project type created taking project.json as base
Click to show internal directories.
Click to hide internal directories.