Versions in this module Expand all Collapse all v0 v0.1.1 Apr 30, 2020 Changes in this version + var ErrExeNotExecutable = errors.New("file at executable path is not executable") + var ErrExeNotExist = errors.New("no file located at executable path") + var ErrNoDescription = errors.New("service does not have a description") + var ErrNoDisplayName = errors.New("service does not have a display name") + var ErrNoName = errors.New("service does not have a name") + var ErrNotEnoughPerms = errors.New("current user does not have privileges to manipulate services") + var ErrSystemUnsupported = errors.New("no supported system supervisor located") + var ErrWorkingDirNotExist = errors.New("working directory does not exist") + func IsErrExeNotExecutable(e error) bool + func IsErrExeNotExist(e error) bool + func IsErrNoDescription(e error) bool + func IsErrNoDisplayName(e error) bool + func IsErrNoName(e error) bool + func IsErrNotEnoughPerms(e error) bool + func IsErrSystemUnsupported(e error) bool + func IsErrWorkingDirNotExist(e error) bool + func ServicePlatform() string + type KeyValue map[string]interface + func (k KeyValue) GetBool(key string) bool + type Service struct + Arguments []string + Description string + DisplayName string + ExecutablePath string + Name string + Options KeyValue + UserName string + WorkingDirectory string + func NewAsZero() *Service + func NewFromArgs(name, displayName, description, exePath string, args []interface{}, ...) (*Service, error) + func NewFromJSON(jsonData map[string]interface{}) (*Service, error) + func (s *Service) AppendArguments(args []interface{}) + func (s *Service) CheckConfig(autofix bool) (bool, error) + func (s *Service) CheckExists() (bool, error) + func (s *Service) Install(overwrite bool) error + func (s *Service) Restart() error + func (s *Service) RestartWithDelay(seconds int64) error + func (s *Service) ServiceFilePath() (string, error) + func (s *Service) SetArguments(args []interface{}) + func (s *Service) SetDescription(description string) + func (s *Service) SetDisplayName(displayName string) + func (s *Service) SetExecutablePath(exepath string) + func (s *Service) SetName(name string) + func (s *Service) SetOptions(opts map[string]interface{}) + func (s *Service) SetUserName(username string) + func (s *Service) SetWorkingDirectory(dir string) + func (s *Service) Start() error + func (s *Service) Stop() error + func (s *Service) Uninstall() error