util

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MPV_INIT_RETRY_ATTEMPTS = 5
	MAX_MPV_LOAD_WAIT       = time.Duration(time.Second * 20)
)

Variables

View Source
var (
	// BuildDate - date and time at which the binary is build - imported through ldflags
	BuildDate string

	// BuildHost - Host on which the binary is built - imported through ldflags
	BuildHost string

	// GitCommit - git commit hash - imported through ldflags
	GitCommit string

	// GoVersion - Version of go this binary is built with - imported through ldflags
	GoVersion string

	// VersionTag - version tag
	VersionTag string
)

Functions

func FormatDuration added in v1.5.0

func FormatDuration(duration time.Duration) (form string)

func GetExternalIPs

func GetExternalIPs() (ips []net.IP, err error)

Types

type MpvControl added in v1.5.2

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

func NewMpvControl added in v1.5.2

func NewMpvControl(mpvBinPath, mpvInputPath string) (control *MpvControl, err error)

func (*MpvControl) LoadFile added in v1.5.2

func (c *MpvControl) LoadFile(uri string) (err error)

func (*MpvControl) Pause added in v1.5.2

func (c *MpvControl) Pause(pauseState bool) (err error)

func (*MpvControl) Seek added in v1.5.2

func (c *MpvControl) Seek(positionSeconds int) (err error)

func (*MpvControl) Stop added in v1.5.2

func (c *MpvControl) Stop() (err error)

type Pair added in v1.5.0

type Pair struct {
	Key string
	Val int
}

func GetSortedStringIntMap added in v1.5.0

func GetSortedStringIntMap(mp map[string]int) (slice []Pair)

GetSortedStringIntMap - Takes a map[string]int, creates key/val Pairs and returns a sorted slice

Jump to

Keyboard shortcuts

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