os

package
v0.0.0-...-4a84db8 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TargetIntMap = map[int]OSType{
	1: Windows,
	2: Linux,
}
View Source
var TargetMap = map[OSType]string{
	Windows: "Windows",
	Linux:   "Linux",
}

Functions

func NewService

func NewService(
	configuration *environment.Configuration,
	terminal services.Terminal,
	osType OSType,
) services.OS

Types

type OSType

type OSType int
const (
	Unknown OSType = iota
	Windows
	Linux
)

func DetectOS

func DetectOS() OSType

DetectOS return an int which represent a OS type

type OperatingSystemService

type OperatingSystemService struct {
	Configuration *environment.Configuration
	Terminal      services.Terminal
	OSType        OSType
}

func (OperatingSystemService) Lock

func (os OperatingSystemService) Lock() error

func (OperatingSystemService) Restart

func (os OperatingSystemService) Restart() error

func (OperatingSystemService) Shutdown

func (os OperatingSystemService) Shutdown() error

func (OperatingSystemService) SignOut

func (os OperatingSystemService) SignOut() error

Jump to

Keyboard shortcuts

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