diff --git a/README.md b/README.md index eca6ef1..4601fe6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/errors.go b/errors.go new file mode 100644 index 0000000..c5313c7 --- /dev/null +++ b/errors.go @@ -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") +) diff --git a/systemctl.go b/systemctl.go index ec94ff6..4d54196 100644 --- a/systemctl.go +++ b/systemctl.go @@ -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 +}