-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathmetasubcontext.go
48 lines (34 loc) · 993 Bytes
/
metasubcontext.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
package operate
import (
"github.com/itchio/butler/butlerd"
itchio "github.com/itchio/go-itchio"
)
type InstallParams struct {
StagingFolder string `json:"stagingFolder"`
Reason butlerd.DownloadReason `json:"reason"`
CaveID string `json:"caveId"`
InstallFolderName string `json:"installFolderName"`
InstallLocationID string `json:"installLocationID"`
InstallFolder string `json:"installFolder"`
NoCave bool `json:"noCave"`
Game *itchio.Game `json:"game"`
Upload *itchio.Upload `json:"upload"`
Build *itchio.Build `json:"build"`
IgnoreInstallers bool `json:"ignoreInstallers,omitempty"`
Access *GameAccess `json:"credentials"`
}
type MetaSubcontext struct {
Data *InstallParams
}
func NewMetaSubcontext() *MetaSubcontext {
return &MetaSubcontext{
Data: &InstallParams{},
}
}
var _ Subcontext = (*MetaSubcontext)(nil)
func (mt *MetaSubcontext) Key() string {
return "meta"
}
func (mt *MetaSubcontext) GetData() interface{} {
return &mt.Data
}