Documentation ¶
Index ¶
- func DefaultDustRoot() string
- func InferProjectNameFromURL(u *url.URL) string
- func Install(root, name, srcURL string, entry *catalog.Entry) error
- func Unzip(src string, dest string, removeArchiveRoot bool) ([]string, error)
- type Layout
- func (l *Layout) AudioDir() string
- func (l *Layout) CreateProject(name string) (*Project, error)
- func (l *Layout) DataDir() string
- func (l *Layout) EnsureDirectories() error
- func (l *Layout) GetProject(name string) *Project
- func (l *Layout) GetProjects() *[]Project
- func (l *Layout) ProjectsDir() string
- func (l *Layout) TapeDir() string
- type MetaData
- type Project
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDustRoot ¶
func DefaultDustRoot() string
DefaultDustRoot returns the default root directory path for dust
func InferProjectNameFromURL ¶
InferProjectNameFromURL does just that...
Types ¶
type Layout ¶
type Layout struct {
RootDir string
}
Layout describes a dust directory structure
func (*Layout) AudioDir ¶
AudioDir returns the path to the audio directory for the given root directory
func (*Layout) CreateProject ¶
CreateProject creates a new project directory with the given name if it does not already exist, returning a new Project on success
func (*Layout) DataDir ¶
DataDir returns the path to the data directory for the given root directory
func (*Layout) EnsureDirectories ¶
EnsureDirectories creates any of the standard directories if they do not exist
func (*Layout) GetProjects ¶
GetProjects returns an array of Project(s), one for each project directory in the layout
func (*Layout) ProjectsDir ¶
ProjectsDir require the path to the directory containing projects
type MetaData ¶
type MetaData struct { Header catalog.Header `json:"file_info"` Installed time.Time `json:"installed_on"` Updated time.Time `json:"updated_on,omitempty"` SourceURL string `json:"project_url"` Entry *catalog.Entry `json:"catalog_entry,omitempty"` }
MetaData encapsulates information about the project known during installation
type Project ¶
Project encapsulates a dust project
func GetProjects ¶
GetProjects returns Project instances for all recognized projects in root
func NewProject ¶
NewProject creates a Project for the given name and root directory
func SearchProjects ¶
SearchProjects returns a pointer to the project matching name or nil
func (*Project) GetMetaData ¶
GetMetaData reads and returns any meta data for the project
func (*Project) GetVersion ¶
GetVersion returns the name of the tag at the current HEAD or the commit hash
func (*Project) IsManaged ¶
IsManaged returns true if the project appears to be managed as a git repo
func (*Project) Update ¶
Update pulls down any changes for the project if it is managed via git, returns true if the project was updated
func (*Project) UpdateMetaData ¶
UpdateMetaData updates the 'update_time' key in the project metadata