-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtypes.go
69 lines (57 loc) · 1.04 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package cli
import (
"encoding/json"
"github.com/Vilsol/go-mlog/runtime"
"image"
"io"
)
// Compile-time checks
var (
_ runtime.Message = (*Message)(nil)
_ runtime.Display = (*Display)(nil)
_ runtime.Memory = (*Memory)(nil)
)
type ObjectType string
const (
ObjectMessage = ObjectType("message")
ObjectDisplay = ObjectType("display")
ObjectMemory = ObjectType("memory")
)
type Config struct {
Objects []ObjectConfig
}
type ObjectConfig struct {
Type ObjectType
Name string
Options json.RawMessage
}
type MessageOptions struct {
Output string
}
type Message struct {
Name string
Output io.Writer
}
type DisplayOptions struct {
Width int
Height int
Scale float64
Output string
}
type Display struct {
Width int
Height int
Scale float64
Output string
FrameCount int
PreviousFrame image.Image
SaveCurrentFrame func(img image.Image, display *Display)
}
type MemoryOptions struct {
Size int64
}
type Memory struct {
Name string
Size int64
Data map[int64]float64
}