services

package
v0.0.0-...-ee84426 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateRinging = iota + 1
	StateSnoozing
	StateDisabled
	StateWaiting
)

Variables

Functions

func Layout

func Layout() (*fyne.Container, error)

Types

type AlarmService

type AlarmService struct {
	Alarms []*AlarmTime
}

func NewAlarmService

func NewAlarmService() *AlarmService

func (*AlarmService) NewAlarm

func (as *AlarmService) NewAlarm(ringtime time.Time) *AlarmTime

func (*AlarmService) NextAlarm

func (as *AlarmService) NextAlarm() (*AlarmTime, error)

type AlarmTime

type AlarmTime struct {
	NextRing time.Time
	Ring     time.Time
}

type MediaService

type MediaService struct {
	Context *oto.Context
	Player  *oto.Player
	Stream  media.MediaStream
	// contains filtered or unexported fields
}

func NewMediaService

func NewMediaService() *MediaService

func (*MediaService) Play

func (ms *MediaService) Play(station string) (chan bool, error)

func (*MediaService) PlayRemoteMP3

func (ms *MediaService) PlayRemoteMP3(stream media.MediaStream) error

func (*MediaService) Stop

func (ms *MediaService) Stop()

Jump to

Keyboard shortcuts

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