moth/cmd/mothd/common.go

37 lines
537 B
Go
Raw Normal View History

2019-09-02 18:42:27 -06:00
package main
import (
"io"
2019-09-02 19:47:24 -06:00
"time"
2019-09-02 18:42:27 -06:00
)
type Category struct {
Name string
Puzzles []int
2019-09-02 19:47:24 -06:00
}
type ReadSeekCloser interface {
io.Reader
io.Seeker
io.Closer
2019-09-02 18:42:27 -06:00
}
2019-09-02 19:47:24 -06:00
type PuzzleProvider interface {
Metadata(cat string, points int) (io.ReadCloser, error)
Open(cat string, points int, path string) (io.ReadCloser, error)
Inventory() []Category
}
type ThemeProvider interface {
Open(path string) (ReadSeekCloser, error)
ModTime(path string) (time.Time, error)
}
type StateProvider interface {
}
type Component interface {
Update()
}