sysfs

package module
v0.0.0-...-68e6f4d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 6 Imported by: 4

README

go-sysfs

Go package for Linux sysfs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Path string
	File *os.File
}

func (*Attribute) Close

func (attrib *Attribute) Close() (err error)

func (*Attribute) Exists

func (attrib *Attribute) Exists() bool

func (*Attribute) Ioctl

func (attrib *Attribute) Ioctl(request, arg uintptr) (result uintptr, errno syscall.Errno, err error)

func (*Attribute) Open

func (attrib *Attribute) Open() (err error)

func (*Attribute) OpenRO

func (attrib *Attribute) OpenRO() (err error)

func (*Attribute) Print

func (attrib *Attribute) Print(value interface{}) (err error)

func (*Attribute) Printf

func (attrib *Attribute) Printf(format string, args ...interface{}) (err error)

func (*Attribute) Read

func (attrib *Attribute) Read() (str string, err error)

func (*Attribute) ReadByte

func (attrib *Attribute) ReadByte() (value byte, err error)

func (*Attribute) ReadBytes

func (attrib *Attribute) ReadBytes() (data []byte, err error)

func (*Attribute) ReadInt

func (attrib *Attribute) ReadInt() (value int, err error)

func (*Attribute) ReadUint64

func (attrib *Attribute) ReadUint64() (value uint64, err error)

func (*Attribute) Scan

func (attrib *Attribute) Scan(value interface{}) (err error)

func (*Attribute) Scanf

func (attrib *Attribute) Scanf(format string, args ...interface{}) (err error)

func (*Attribute) Write

func (attrib *Attribute) Write(value string) (err error)

func (*Attribute) WriteByte

func (attrib *Attribute) WriteByte(value byte) (err error)

func (*Attribute) WriteBytes

func (attrib *Attribute) WriteBytes(data []byte) (err error)

func (*Attribute) WriteInt

func (attrib *Attribute) WriteInt(value int) (err error)

func (*Attribute) WriteUint64

func (attrib *Attribute) WriteUint64(value uint64) (err error)

type Object

type Object string

func (Object) Attribute

func (obj Object) Attribute(name string) *Attribute

func (Object) Attributes

func (obj Object) Attributes() []Attribute

func (Object) Exists

func (obj Object) Exists() bool

func (Object) Name

func (obj Object) Name() string

func (Object) SubObject

func (obj Object) SubObject(name string) Object

func (Object) SubObjects

func (obj Object) SubObjects() []Object

type Subsystem

type Subsystem string
var (
	Block       Subsystem = "/sys/block"
	Bus         Subsystem = "/sys/bus"
	Class       Subsystem = "/sys/class"
	Dev         Subsystem = "/sys/dev"
	Devices     Subsystem = "/sys/devices"
	Firmware    Subsystem = "/sys/firmware"
	FS          Subsystem = "/sys/fs"
	Hypervision Subsystem = "/sys/hypervisor"
	Kernel      Subsystem = "/sys/kernel"
	Module      Subsystem = "/sys/module"
	Power       Subsystem = "/sys/power"
)

func (Subsystem) Exists

func (subsys Subsystem) Exists() bool

func (Subsystem) Name

func (subsys Subsystem) Name() string

func (Subsystem) Object

func (subsys Subsystem) Object(name string) Object

func (Subsystem) Objects

func (subsys Subsystem) Objects() []Object

Jump to

Keyboard shortcuts

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