Documentation
¶
Overview ¶
Package vdmspec defines the Spec and Remote struct types, and their associated methods.
Index ¶
Constants ¶
const ( // MetaFileName is the name of the tracking file that vdm uses to record & // track remote statuses on disk. MetaFileName string = "VDMMETA" // GitType represents the string to match against for git remote types. GitType string = "git" // FileType represents the string to match against for file remote types. FileType string = "file" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remote ¶
type Remote struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Remote string `json:"remote" yaml:"remote"` Version string `json:"version,omitempty" yaml:"version,omitempty"` LocalPath string `json:"local_path" yaml:"local_path"` }
Remote defines the structure of each remote configuration in the vdm specfile.
func (Remote) GetVDMMeta ¶
GetVDMMeta reads the metafile from disk, and returns it for further processing.
func (Remote) MakeMetaFilePath ¶
MakeMetaFilePath constructs the metafile path that vdm will use to track a remote's state on disk.
func (Remote) OpMsg ¶
OpMsg constructs a loggable message outlining the specific operation being performed at the moment
func (Remote) WriteVDMMeta ¶
WriteVDMMeta writes the metafile contents to disk, the path of which is determined by Remote.MakeMetaFilePath.
type Spec ¶
type Spec struct {
Remotes []Remote `json:"remotes" yaml:"remotes"`
}
Spec defines the overall structure of the vmd specfile.
func GetSpecFromFile ¶
GetSpecFromFile reads the specfile from disk (the path of which is determined by the user-supplied flag value), and returns it for further processing of remotes.