1// Copyright 2019 Istio Authors 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package schema 16 17// Embed the core metadata file containing the collections as a resource 18//go:generate go-bindata --nocompress --nometadata --pkg schema -o metadata.gen.go metadata.yaml 19 20// Create static initializers files in each of the output directories 21//go:generate go run $REPO_ROOT/pkg/config/schema/codegen/tools/staticinit.main.go schema metadata.yaml staticinit.gen.go 22// nolint: lll 23//go:generate go run $REPO_ROOT/pkg/config/schema/codegen/tools/staticinit.main.go collections metadata.yaml "$REPO_ROOT/pkg/config/schema/collections/staticinit.gen.go" 24// nolint: lll 25//go:generate go run $REPO_ROOT/pkg/config/schema/codegen/tools/staticinit.main.go snapshots metadata.yaml "$REPO_ROOT/pkg/config/schema/snapshots/staticinit.gen.go" 26 27// Create collection constants 28// nolint: lll 29//go:generate go run $REPO_ROOT/pkg/config/schema/codegen/tools/collections.main.go collections metadata.yaml "$REPO_ROOT/pkg/config/schema/collections/collections.gen.go" 30 31// Create snapshot constants 32// nolint: lll 33//go:generate go run $REPO_ROOT/pkg/config/schema/codegen/tools/snapshots.main.go snapshots metadata.yaml "$REPO_ROOT/pkg/config/schema/snapshots/snapshots.gen.go" 34 35//go:generate goimports -w -local istio.io "$REPO_ROOT/pkg/config/schema/collections/collections.gen.go" 36//go:generate goimports -w -local istio.io "$REPO_ROOT/pkg/config/schema/snapshots/snapshots.gen.go" 37//go:generate goimports -w -local istio.io "$REPO_ROOT/pkg/config/schema/staticinit.gen.go" 38//go:generate goimports -w -local istio.io "$REPO_ROOT/pkg/config/schema/collections/staticinit.gen.go" 39//go:generate goimports -w -local istio.io "$REPO_ROOT/pkg/config/schema/snapshots/staticinit.gen.go" 40