Documentation
¶
Overview ¶
Package service contains the domain layer for the service struct. The service struct is the main entity of the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Types = []Type{TypeOneshot, TypeLongrun, TypeBundle}
Functions ¶
Types ¶
type Repository ¶
type Repository interface {
// All returns all services
All() ([]*Service, error)
// One returns one service
One(id Id) (*Service, error)
RemoveDirectory(path string) error
RemoveFile(path string) error
ServiceScriptFilePath(id Id) (string, error)
ServicePath(id Id) string
ServiceDependenciesPath(s *Service) (string, error)
FileExists(file string) bool
AllFileExists(files []string) bool
AnyFileExists(files []string) bool
CreateDependencies(service *Service) error
FindDependenciesById(id Id) ([]string, error)
CreateTypeFile(*Service) error
CreateFile(path string, content []byte, perm int) error
CreateDirectory(path string, perm int) error
}
Repository is the interface for the service repository
type StepCollection ¶
type StepCollection struct {
Repo Repository
Service *Service
Steps []func(repo Repository, s *Service) error
}
func (StepCollection) Iterate ¶
func (c StepCollection) Iterate() error
Iterate implements the StepIterator interface
type StepIterator ¶
type StepIterator interface {
Iterate() error
}
Click to show internal directories.
Click to hide internal directories.