Documentation ¶
Index ¶
- func Available(configDir string) bool
- func BackupData(configDir, updateDir, backupDir string) error
- func ClearUpdates(configDir string) error
- func CopyFile(in, out string) error
- func DisablePlugins(configDir string, pname []string) error
- func EnablePlugins(configDir string, pname []string) error
- func GetReadme(configDir string, pluginName string) (io.ReadCloser, error)
- func ListPlugins(configDir string) (map[string]*assets.Plugin, error)
- func ModifyConfigFile(configDir string, c *assets.Configuration) error
- func OverwriteFile(in, out string) error
- func ReadConfig(configDir string) (*assets.Configuration, error)
- func ReadConfigFile(configDir string) ([]byte, error)
- func RemovePlugins(configDir, updateDir, backupDir string, plugins []string) error
- func ReplaceOrStart(heedyPath string, args ...string) error
- func ReplaceProcess(heedyPath string, args ...string) error
- func Revert(configDir string, failure error) error
- func RevertConfig(configDir, backupDir, revertDir string) error
- func RevertData(configDir, backupDir, revertDir string) error
- func RevertHeedy(configDir, backupDir, revertDir string) error
- func RevertPlugins(configDir, backupDir, revertDir string) error
- func Run(o Options) error
- func SetConfigFile(configDir string, b []byte) error
- func ShiftFiles(in, middle, out string) error
- func StartHeedy(configDir string, replace bool, extraArgs ...string) error
- func StartProcess(heedyPath string, args ...string) error
- func Status(configDir string) error
- func UnzipDirectory(src string, dest string) error
- func Update(configDir string) (bool, error)
- func UpdateConfig(configDir, updateDir, backupDir string) error
- func UpdateHeedy(configDir, updateDir, backupDir string) error
- func UpdatePlugin(configDir string, zipFile string) error
- func UpdatePlugins(configDir, updateDir, backupDir string) error
- func WriteOptions(configDir string, o *UpdateOptions) error
- func ZipDirectory(zipFile, inputDir string) error
- type Options
- type UpdateInfo
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupData ¶
func ClearUpdates ¶
func DisablePlugins ¶
func EnablePlugins ¶
func ListPlugins ¶
Lists ALL plugins (including those that are not active, and those that are currently pending restart)
func ModifyConfigFile ¶
func ModifyConfigFile(configDir string, c *assets.Configuration) error
func OverwriteFile ¶
func ReadConfig ¶
func ReadConfig(configDir string) (*assets.Configuration, error)
func ReadConfigFile ¶
func RemovePlugins ¶
func ReplaceOrStart ¶
func ReplaceProcess ¶
ReplaceProcess replaces the current process with the one given. It only works on unix
so it will fail with an error on Windows.
func RevertConfig ¶
func RevertData ¶
func RevertHeedy ¶
RevertHeedy reverts the heedy executable to the backed up version if such exists
func RevertPlugins ¶
func SetConfigFile ¶
func ShiftFiles ¶
ShiftFiles moves middle->out (if exists), and then in->middle
func StartHeedy ¶
StartHeedy starts the heedy server set up for the given database. If replace is true, it tries to replace the current process with the new one, if not, or if replacement is not supported, it starts the new process in the background.
func StartProcess ¶
StartProcess starts the given process in the background, and releases it, so that closing the current process doesn't close the child.
func UnzipDirectory ¶
UnzipDirectory will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2). https://golangcode.com/unzip-files-in-go/
func UpdateConfig ¶
func UpdateHeedy ¶
UpdateHeedy updates the heedy executable
func UpdatePlugin ¶
func UpdatePlugins ¶
UpdatePlugins updates all the plugins
func WriteOptions ¶
func WriteOptions(configDir string, o *UpdateOptions) error
func ZipDirectory ¶
Types ¶
type UpdateInfo ¶
type UpdateInfo struct { Heedy bool `json:"heedy"` Config bool `json:"config"` Plugins []string `json:"plugins"` Options *UpdateOptions `json:"options"` }
func GetInfo ¶
func GetInfo(configDir string) (ui UpdateInfo, err error)
type UpdateOptions ¶
type UpdateOptions struct { BackupData bool `json:"backup"` DeletedPlugins []string `json:"deleted"` }
func ReadOptions ¶
func ReadOptions(configDir string) (*UpdateOptions, error)