refactor: rename universal_rebuild/ → provider/
- Rename directory - Update all 9 devops scripts - Update 4 generator source files - Rebuild all binaries
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// Package spec — построение YAML-спецификации сервиса.
|
||||
package spec
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"yaml-generator/internal/types"
|
||||
)
|
||||
|
||||
// DefaultOutputParams возвращает стандартный набор выходных параметров.
|
||||
func DefaultOutputParams() []types.OutputParam {
|
||||
return []types.OutputParam{
|
||||
{Code: "state_params", Type: "map"},
|
||||
{Code: "state_out", Type: "map"},
|
||||
{Code: "state_params_flat", Type: "map"},
|
||||
{Code: "state_out_flat", Type: "map"},
|
||||
{Code: "vault_secrets", Type: "map", Sensitive: true},
|
||||
{Code: "vault_url", Type: "string"},
|
||||
{Code: "vault_user_path", Type: "string"},
|
||||
{Code: "vault_fields", Type: "list"},
|
||||
}
|
||||
}
|
||||
|
||||
// ValidateOutputDir проверяет, что выходная директория не legacy resources_ops_yaml.
|
||||
func ValidateOutputDir(path string) error {
|
||||
base := strings.ToLower(strings.TrimSpace(filepath.Base(path)))
|
||||
if base == "resources_ops_yaml" {
|
||||
return fmt.Errorf("invalid output dir %q: use resources_yaml for unified service specs", path)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user