darwin

package
v0.18.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package darwin provides a configurer for macOS

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented is returned when a method is not implemented

Functions

This section is empty.

Types

type Darwin

type Darwin struct {
	os.Linux
}

Darwin provides OS support for macOS Darwin

func (Darwin) DaemonReload

func (c Darwin) DaemonReload(_ os.Host) error

DaemonReload reloads init system configuration -- does nothing on darwin

func (Darwin) DisableService

func (c Darwin) DisableService(h os.Host, s string) error

DisableService disables a service

func (Darwin) EnableService

func (c Darwin) EnableService(h os.Host, s string) error

EnableService enables a service

func (Darwin) InstallPackage

func (c Darwin) InstallPackage(h os.Host, s ...string) error

InstallPackage installs a package using brew

func (Darwin) Kind

func (c Darwin) Kind() string

Kind returns "darwin"

func (Darwin) RestartService

func (c Darwin) RestartService(h os.Host, s string) error

RestartService restarts a service

func (Darwin) ServiceIsRunning

func (c Darwin) ServiceIsRunning(h os.Host, s string) bool

ServiceIsRunning returns true if a service is running

func (Darwin) ServiceScriptPath

func (c Darwin) ServiceScriptPath(_ string) (string, error)

ServiceScriptPath returns the path to a service configuration file

func (Darwin) StartService

func (c Darwin) StartService(h os.Host, s string) error

StartService starts a service

func (Darwin) Stat added in v0.6.0

func (c Darwin) Stat(h os.Host, path string, opts ...exec.Option) (*os.FileInfo, error)

Stat returns a FileInfo describing the named file

func (Darwin) StopService

func (c Darwin) StopService(h os.Host, s string) error

StopService stops a service

func (Darwin) Touch added in v0.6.0

func (c Darwin) Touch(h os.Host, path string, ts time.Time, opts ...exec.Option) error

Touch creates a file if it doesn't exist, or updates the modification time if it does

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL