Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyFailed ¶
func AnyFailed(results []FileResult) bool
Types ¶
type APISpecDTO ¶
type APISpecDTO struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Authentication any `json:"authentication,omitempty" yaml:"authentication,omitempty"`
Defaults any `json:"defaults,omitempty" yaml:"defaults,omitempty"`
Endpoints map[string]any `json:"endpoints,omitempty" yaml:"endpoints,omitempty"`
DynamicEndpoints any `json:"dynamic_endpoints,omitempty" yaml:"dynamic_endpoints,omitempty"`
Queues any `json:"queues,omitempty" yaml:"queues,omitempty"`
}
APISpecDTO is an API spec without engine-only fields.
type BuildDTO ¶
type BuildDTO struct {
Target string `json:"target,omitempty" yaml:"target,omitempty"`
Dev any `json:"dev,omitempty" yaml:"dev,omitempty"`
DbtProject any `json:"dbt_project,omitempty" yaml:"dbt_project,omitempty"`
Vars map[string]any `json:"vars,omitempty" yaml:"vars,omitempty"`
Defaults any `json:"defaults,omitempty" yaml:"defaults,omitempty"`
}
BuildDTO is a sling_build.yml file.
type EnvDTO ¶
type EnvDTO struct {
Connections map[string]any `json:"connections,omitempty" yaml:"connections,omitempty"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
Variables map[string]any `json:"variables,omitempty" yaml:"variables,omitempty"`
}
EnvDTO is an env.yaml file. Values are not interpolated.
type FileResult ¶
type FileResult struct {
Path string `json:"path,omitempty"`
Kind Kind `json:"kind"`
OK bool `json:"ok"`
Compiled bool `json:"compiled"`
Parsed any `json:"parsed,omitempty"`
Error string `json:"error,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
FileResult is one validated path.
func ParseFile ¶
func ParseFile(path string, opts Options) FileResult
ParseFile parses one explicit file. Directories are rejected.
func ParsePaths ¶
func ParsePaths(paths []string, opts Options) []FileResult
ParsePaths parses each path. Directories are walked. Parse errors stay in the result list so all files are reported.
type Kind ¶
type Kind string
Kind is a Sling YAML document kind.
func DetectFileKind ¶
DetectFileKind classifies a YAML document from parsed root keys. Content rules match VS Code detectSchemaType order. Path rules run only when content matches nothing. sling_build.yml (or a directory that contains one) is the first path exception. env.yaml is the content-unknown fallback.
type PipelineDTO ¶
type PipelineDTO struct {
Steps []any `json:"steps" yaml:"steps"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
}
PipelineDTO is a pipeline file without engine-only fields.
type ProjectDTO ¶
type ProjectDTO struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
Jobs map[string]any `json:"jobs,omitempty" yaml:"jobs,omitempty"`
}
ProjectDTO is a sling_project.yml manifest.
type ReplicationDTO ¶
type ReplicationDTO struct {
Source any `json:"source" yaml:"source"`
Target any `json:"target" yaml:"target"`
Hooks any `json:"hooks,omitempty" yaml:"hooks,omitempty"`
Defaults any `json:"defaults,omitempty" yaml:"defaults,omitempty"`
Streams map[string]any `json:"streams" yaml:"streams"`
Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`
}
ReplicationDTO is a replication file without engine-only fields.