-
Notifications
You must be signed in to change notification settings - Fork 0
/
plan-outputs.go
41 lines (34 loc) · 1016 Bytes
/
plan-outputs.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
package nixpacks
import "encoding/json"
type PlanOutput struct {
Response []byte
Providers []string `json:"providers"`
BuildImage string `json:"buildImage"`
Variables map[string]string `json:"variables"`
Phases Phases `json:"phases"`
Start Start `json:"start"`
}
type Phases struct {
Build Phase `json:"build"`
Install Phase `json:"install"`
Setup Setup `json:"setup"`
}
type Phase struct {
DependsOn []string `json:"dependsOn"`
Cmds []string `json:"cmds"`
CacheDirectories []string `json:"cacheDirectories"`
}
type Setup struct {
NixPkgs []string `json:"nixPkgs"`
NixLibs []string `json:"nixLibs"`
AptPkgs []string `json:"aptPkgs"`
NixOverlays []string `json:"nixOverlays"`
NixpkgsArchive string `json:"nixpkgsArchive"`
}
type Start struct {
Cmd string `json:"cmd"`
RunImage string `json:"runImage"`
}
func (b *PlanOutput) Parse() error {
return json.Unmarshal(b.Response, b)
}