2019-01-01 08:23:01 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-01-09 16:54:15 +00:00
|
|
|
bindata "github.com/jteeuwen/go-bindata"
|
|
|
|
v1 "github.com/rancher/k3s/types/apis/k3s.cattle.io/v1"
|
2019-01-01 08:23:01 +00:00
|
|
|
"github.com/rancher/norman/generator"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2019-01-09 16:54:15 +00:00
|
|
|
basePackage = "github.com/rancher/k3s/types"
|
2019-01-01 08:23:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-01-09 16:54:15 +00:00
|
|
|
bc := &bindata.Config{
|
|
|
|
Input: []bindata.InputConfig{
|
|
|
|
{
|
|
|
|
Path: "build/data",
|
|
|
|
Recursive: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Package: "data",
|
|
|
|
NoCompress: true,
|
|
|
|
NoMemCopy: true,
|
|
|
|
NoMetadata: true,
|
|
|
|
Output: "pkg/data/zz_generated_bindata.go",
|
|
|
|
}
|
|
|
|
if err := bindata.Translate(bc); err != nil {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
2019-01-01 08:23:01 +00:00
|
|
|
if err := generator.DefaultGenerate(v1.Schemas, basePackage, false, nil); err != nil {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|