stubbs out errors, adds mask and unmask to scope

This commit is contained in:
Tai Groot 2021-05-14 14:46:38 -07:00
parent 50f85eb623
commit 7762c3af12
Signed by: taigrr
GPG Key ID: D00C269A87614812
3 changed files with 27 additions and 0 deletions

View File

@ -21,6 +21,8 @@ systemctl may be used to introspect and control the state of the "systemd" syste
- [ ] `systemctl is-enabled`
- [ ] `systemctl daemon-reload`
- [ ] `systemctl show`
- [ ] `systemctl mask`
- [ ] `systemctl unmask`
## TODO

14
errors.go Normal file
View File

@ -0,0 +1,14 @@
package systemctl
import (
"errors"
)
var (
// ErrSystemctlNotInstalled means that upon trying to manually locate systemctl in the user's path,
// it was not found. If this error occurs, the library isn't entirely useful.
ErrNotInstalled = errors.New("systemd binary was not found")
// ErrExecTimeout means that the provided context was done before the command finished execution.
ErrExecTimeout = errors.New("command timed out")
)

View File

@ -49,6 +49,17 @@ func IsEnabled(unit string) (bool, error) {
func DaemonReload(unit string) error {
return nil
}
//TODO
func Show(unit string, property string) (string, error) {
return "", nil
}
//TODO
func Mask(unit string) error {
return nil
}
func Unmask(unit string) error {
return nil
}