Documentation ¶
Index ¶
- func FileMatches(src string, srcInfo os.FileInfo, file File) (bool, string)
- func GetProjectDir() string
- func Validate(values ValidationValues)
- type AbstractFileEntry
- type Config
- type File
- type FileConfig
- type FileEntry
- type FileEntryRaw
- type LocalDotsConfig
- type Project
- type SystemDotsConfig
- type UserDotsConfig
- type ValidatedArgs
- type ValidationValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileMatches ¶
FileMatches determines a particular file matches returned string can either be "folder" or "file"
func GetProjectDir ¶
func GetProjectDir() string
GetProjectDir gets the root location of the current project, by recursively walking up directory tree until a globe.toml file is found. It stop searching after it reaches the user's home directory
func Validate ¶
func Validate(values ValidationValues)
Validate command line arguments and directory structure
Types ¶
type AbstractFileEntry ¶
type AbstractFileEntry struct { }
AbstractFileEntry contains file entries except for the Path, which is modified
type Config ¶
type Config struct { Project struct { License string `toml:"license"` Tags []string `toml:"tags"` } `toml:"project"` }
Config is the configuration file used to manage Globe. This is your `globe.toml` file
func ReadConfig ¶
ReadConfig reads the local globe.toml config file
type File ¶
type File struct { File string `toml:"file"` Tags []string `toml:"tags"` Type string `toml:"type"` Heuristic1 bool Heuristic2 bool Heuristic3 bool }
File represents an entry in the `user.dots.toml` file
type FileConfig ¶
type FileConfig struct {
Files []FileEntryRaw `yaml:"files"`
}
FileConfig is a representation of files to transfer
func ReadFileConfig ¶
func ReadFileConfig(storeDir string, storeLocation string) FileConfig
ReadFileConfig reads the local sync.yml configuration file
type FileEntry ¶
type FileEntry struct { For []string `yaml:"for"` Op string `yaml:"op"` Tags []string `yaml:"tags"` Usage string `yaml:"usage"` // AbstractFileEntry SrcPath string `yaml:"srcPath"` DestPath string `yaml:"destPath"` RelPath string `yaml:"relPath"` }
FileEntry is the same as FileEntryRaw, except it has been processed
type FileEntryRaw ¶
type FileEntryRaw struct { For []string `yaml:"for"` Op string `yaml:"op"` Tags []string `yaml:"tags"` Usage string `yaml:"usage"` // AbstractFileEntry, Path string `yaml:"path"` }
FileEntryRaw has data about a single file that is meant to be bootstrapped. It's raw because it comes straight from the bootstrapFiles.yml file
type LocalDotsConfig ¶
type LocalDotsConfig struct {
Files []File `toml:"files"`
}
LocalDotsConfig represents the `local.dots.toml` file
func GetLocalToml ¶
func GetLocalToml(storeDir string) LocalDotsConfig
GetLocalToml gets local (.) config
type Project ¶
type Project struct { ProjectDir string StoreDir string UserDir string Config Config Files []FileEntry }
Project includes all details of the current Project
type SystemDotsConfig ¶
type SystemDotsConfig struct {
Files []File `toml:"files"`
}
SystemDotsConfig represents the `system.dots.toml` file
func GetSystemToml ¶
func GetSystemToml(storeDir string) SystemDotsConfig
GetSystemToml gets System (/) config
type UserDotsConfig ¶
type UserDotsConfig struct {
Files []File `toml:"files"`
}
UserDotsConfig represents the `user.dots.toml` file
func GetUserToml ¶
func GetUserToml(storeDir string) UserDotsConfig
GetUserToml gets user (~) config
type ValidatedArgs ¶
type ValidatedArgs struct {
StoreDir string
}
ValidatedArgs returns the value of cli arguments