blocks

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const URLTemplate = `https://api.kraken.com/0/public/Ticker?pair=%s`

See https://www.kraken.com/en-gb/features/api#get-ticker-info

Variables

View Source
var (
	// Normal mode.
	DefaultTimeStamp = TimeStamp{
		Fmt: "Mon Jan 2, 3:04pm",
	}

	// Test mode (more frequent updates).
	TestTimeStamp = TimeStamp{
		Fmt: "Mon Jan 2, 3:04:05pm MST",
	}
)

Functions

func Charging

func Charging() (bool, error)

Charging returns true if power supply AC is online.

Types

type APIResponse

type APIResponse struct {
	Result struct {
		Pair struct {
			P [2]string
		} `json:"XXBTZCAD"`
	} `json:"result"`
}

type Battery

type Battery struct{}

Battery represents battery information.

func (*Battery) String

func (b *Battery) String() string

String returns battery info in a textual format.

type CryptoCurrency

type CryptoCurrency struct {
	Pair string
}

func (*CryptoCurrency) String

func (c *CryptoCurrency) String() string

type Disk

type Disk struct {
	Dir string
}

DiskInfo represents hard disk info.

func (*Disk) String

func (d *Disk) String() string

type LoadAvg

type LoadAvg struct {
	// contains filtered or unexported fields
}

LoadAvg represents the system load average (1, 5, and 15 minutes).

func (*LoadAvg) String

func (la *LoadAvg) String() string

String implements the fmt.Stringer interface.

type TimeStamp

type TimeStamp struct {
	Fmt string
	time.Time
}

func (TimeStamp) String

func (ts TimeStamp) String() string

String implements the fmt.Stringer interface.

type Volume

type Volume struct {
	Level string
	Mute  bool
}

Volume represents the volume of the default pulseaudio sink.

func (*Volume) String

func (v *Volume) String() string

type WifiData

type WifiData struct {
	ESSID string
}

func (*WifiData) String

func (w *WifiData) String() string

String implements the fmt.Stringer interface.

Jump to

Keyboard shortcuts

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