dive-zfs/runtime/types.go
Alex Goodman e4ddfb411c
Expose CI validation options to the CLI (#212)
* expose ci config to cli switches; addresses #198

* added/updated tests for ci configuration
2019-07-26 10:27:00 -04:00

39 lines
855 B
Go

package runtime
import (
"github.com/spf13/viper"
)
type Options struct {
Ci bool
ImageId string
ExportFile string
CiConfig *viper.Viper
BuildArgs []string
}
type export struct {
Layer []exportLayer `json:"layer"`
Image exportImage `json:"image"`
}
type exportLayer struct {
Index int `json:"index"`
DigestID string `json:"digestId"`
SizeBytes uint64 `json:"sizeBytes"`
Command string `json:"command"`
}
type exportImage struct {
SizeBytes uint64 `json:"sizeBytes"`
InefficientBytes uint64 `json:"inefficientBytes"`
EfficiencyScore float64 `json:"efficiencyScore"`
InefficientFiles []inefficientFiles `json:"inefficientFiles"`
}
type inefficientFiles struct {
Count int `json:"count"`
SizeBytes uint64 `json:"sizeBytes"`
File string `json:"file"`
}