Documentation ¶
Index ¶
- Constants
- func CopyFile(src, dst string) error
- func DeleteFileOrDirectory(path, filename string) error
- func FileExists(path, filename string) bool
- func Init(path string) error
- func MakeDir(homeDir string, subDirs ...string) error
- func ManifestExists(path string) bool
- func NodeFile(homeDir, nodeID string) string
- func NodesDir(homeDir string) string
- func PathExists(path string) bool
- func PluginsDir(homeDir string) string
- func Read(path, filename string) ([]byte, error)
- func ReadDirs(path string) ([]os.FileInfo, error)
- func ReadFile(path, filename string, v interface{}) error
- func Walk(path string, f filepath.WalkFunc) error
- func WriteFile(path, filename string, v interface{}) error
- type Manifest
Constants ¶
View Source
const ManifestFilename = "manifest.json"
ManifestFilename contains the filename of the manifest file
Variables ¶
This section is empty.
Functions ¶
func DeleteFileOrDirectory ¶
DeleteFileOrDirectory delets a file or directory
func FileExists ¶
FileExists checks if a file exists in a particular path
func ManifestExists ¶
ManifestExists returns true if the manifest already exists
func PluginsDir ¶
Types ¶
type Manifest ¶
type Manifest struct { // Plugins are a map of package name -> version Plugins map[string]plugin.MetaInfo `json:"plugins"` LatestCLIVersion string `json:"latest_cli_version"` LatestCLIVersionUpdatedAt time.Time `json:"latest_cli_version_updated_at"` // this could be internal (lower case) but golanglint-ci will complain Path string `json:"-"` }
Manifest contains information about the installed plugins and cli
func LoadManifest ¶
LoadManifest reads the manifest from a file
func (*Manifest) HasPluginsInstalled ¶
HasPluginsInstalled returns true if there is at least one installed plugin
func (*Manifest) RemovePlugin ¶
RemovePlugin removes a plugin from the manifest
To write the changes to disk use `Write`
func (*Manifest) UpdatePlugin ¶
UpdatePlugin updates information about one particular plugin
To write the changes to disk use `Write`
Click to show internal directories.
Click to hide internal directories.