istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/test/framework/resource/config/factory.go (about) 1 // Copyright 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 15 package config 16 17 // Factory for config Plan resources. 18 type Factory interface { 19 // New return an empty config Plan. 20 New() Plan 21 22 // YAML returns a Plan with the given YAML and target namespace. 23 YAML(ns string, yamlText ...string) Plan 24 25 // File reads the given files and calls YAML. 26 File(ns string, paths ...string) Plan 27 28 // Eval the same as YAML, but it evaluates the template parameters. 29 Eval(ns string, args any, yamlText ...string) Plan 30 31 // EvalFile the same as File, but it evaluates the template parameters. 32 EvalFile(ns string, args any, paths ...string) Plan 33 }