Add httpfs DB migrations and generate the input (#35)
This commit is contained in:
1 parent
bd5ddea6e4
commit
7f2aa5ca8f
21 files changed
+576
-139
No files matched your search
@@ -4,6 +4,6 @@ THIS_FILE := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
api:
|
||||
go run -tags genapi .
|
||||
goimports -w ${APIGEN_BASEPATH}/api
|
||||
goimports -w ${GEN_BASEPATH}/api
|
||||
|
||||
.PHONY: api
|
||||
@@ -37,7 +37,7 @@ var createFuncs = map[string][]*createInfo{
|
||||
|
||||
func writeCreateFuncs() {
|
||||
for outPkg, funcs := range createFuncs {
|
||||
outFile := os.Getenv("APIGEN_BASEPATH") + fmt.Sprintf("/api/%s/create.gen.go", outPkg)
|
||||
outFile := os.Getenv("GEN_BASEPATH") + fmt.Sprintf("/api/%s/create.gen.go", outPkg)
|
||||
outBuf := bytes.NewBuffer([]byte(fmt.Sprintf(
|
||||
`// Code generated by "make api"; DO NOT EDIT.
|
||||
package %s
|
||||
@@ -92,4 +92,4 @@ func (s {{ .BaseType }}) Create{{ .TargetType }}(ctx context.Context, {{ .LowerT
|
||||
|
||||
return target, apiErr, nil
|
||||
}
|
||||
`))
|
||||
`))
|
||||
@@ -18,9 +18,9 @@ type structInfo struct {
|
||||
|
||||
var inputStructs = []*structInfo{
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/error.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/error.pb.go",
|
||||
"Error",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/error.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/error.gen.go",
|
||||
"Error",
|
||||
"api",
|
||||
"",
|
||||
@@ -29,9 +29,9 @@ var inputStructs = []*structInfo{
|
||||
templateTypeResource,
|
||||
},
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/error.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/error.pb.go",
|
||||
"ErrorDetails",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/error_details.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/error_details.gen.go",
|
||||
"ErrorDetails",
|
||||
"api",
|
||||
"",
|
||||
@@ -40,9 +40,9 @@ var inputStructs = []*structInfo{
|
||||
templateTypeResource,
|
||||
},
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host.pb.go",
|
||||
"Host",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/hosts/host.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/hosts/host.gen.go",
|
||||
"Host",
|
||||
"hosts",
|
||||
"",
|
||||
@@ -51,9 +51,9 @@ var inputStructs = []*structInfo{
|
||||
templateTypeResource,
|
||||
},
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_set.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_set.pb.go",
|
||||
"HostSet",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/hosts/host_set.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/hosts/host_set.gen.go",
|
||||
"HostSet",
|
||||
"hosts",
|
||||
"",
|
||||
@@ -62,9 +62,9 @@ var inputStructs = []*structInfo{
|
||||
templateTypeResource,
|
||||
},
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_catalog.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_catalog.pb.go",
|
||||
"HostCatalog",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/hosts/host_catalog.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/hosts/host_catalog.gen.go",
|
||||
"HostCatalog",
|
||||
"hosts",
|
||||
"",
|
||||
@@ -73,9 +73,9 @@ var inputStructs = []*structInfo{
|
||||
templateTypeResource,
|
||||
},
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_catalog.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_catalog.pb.go",
|
||||
"StaticHostCatalogDetails",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/hosts/static_host_catalog.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/hosts/static_host_catalog.gen.go",
|
||||
"StaticHostCatalogDetails",
|
||||
"hosts",
|
||||
"",
|
||||
@@ -84,9 +84,9 @@ var inputStructs = []*structInfo{
|
||||
templateTypeDetail,
|
||||
},
|
||||
{
|
||||
os.Getenv("APIGEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_catalog.pb.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/internal/gen/controller/api/resources/hosts/host_catalog.pb.go",
|
||||
"AwsEc2HostCatalogDetails",
|
||||
os.Getenv("APIGEN_BASEPATH") + "/api/hosts/awsec2_host_catalog.gen.go",
|
||||
os.Getenv("GEN_BASEPATH") + "/api/hosts/awsec2_host_catalog.gen.go",
|
||||
"AwsEc2HostCatalogDetails",
|
||||
"hosts",
|
||||
"",
|
||||
|
||||
Reference in new issue
Block a user