persistence

package
v0.0.0-...-244ab21 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCategoryDirs

func GetCategoryDirs(directory string) []string

Types

type ByNumPlayed

type ByNumPlayed []Sound

func (ByNumPlayed) Len

func (s ByNumPlayed) Len() int

func (ByNumPlayed) Less

func (s ByNumPlayed) Less(i, j int) bool

func (ByNumPlayed) Swap

func (s ByNumPlayed) Swap(i, j int)

type Persistence

type Persistence struct {
	UpdateCallback func()
	// contains filtered or unexported fields
}

func NewPersistence

func NewPersistence() *Persistence

func (*Persistence) GetCategory

func (p *Persistence) GetCategory(filename string) string

func (*Persistence) IncCounter

func (p *Persistence) IncCounter(filename string)

func (*Persistence) IsPlayable

func (p *Persistence) IsPlayable(filename string) bool

func (*Persistence) JsonState

func (p *Persistence) JsonState() []byte

func (*Persistence) Load

func (p *Persistence) Load()

func (*Persistence) Lock

func (p *Persistence) Lock()

func (*Persistence) SaveThread

func (p *Persistence) SaveThread()

func (*Persistence) State

func (p *Persistence) State() *SoundList

func (*Persistence) Unlock

func (p *Persistence) Unlock()

type Sound

type Sound struct {
	SoundFile   string
	ImageFile   string
	HasImage    bool
	Count       int
	Temperature float32
	Overheated  bool
	Deleted     bool
	Category    string
}

func GetSoundsOfCategory

func GetSoundsOfCategory(directory string, category string) []Sound

type SoundList

type SoundList struct {
	Sounds []Sound
}

func GetSounds

func GetSounds(directoy string) SoundList

Jump to

Keyboard shortcuts

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