Documentation
¶
Overview ¶
Package validation provides CUE-based configuration validation for FTL
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
Access string `json:"access,omitempty"`
Auth *AuthConfig `json:"auth,omitempty"`
Components []*Component `json:"components,omitempty"`
Variables map[string]string `json:"variables,omitempty"`
}
Application represents a validated FTL application These are strongly-typed, validated structures derived from CUE
func ExtractApplication ¶
func ExtractApplication(v cue.Value) (*Application, error)
ExtractApplication extracts validated application data from CUE value
type AuthConfig ¶
type AuthConfig struct {
JWTIssuer string `json:"jwt_issuer,omitempty"`
JWTAudience string `json:"jwt_audience,omitempty"`
JWTJwksURI string `json:"jwt_jwks_uri,omitempty"`
Policy string `json:"policy,omitempty"`
PolicyData interface{} `json:"policy_data,omitempty"` // Can be string or map
}
AuthConfig represents authentication configuration
type BuildConfig ¶
type BuildConfig struct {
Command string `json:"command"`
Workdir string `json:"workdir,omitempty"`
Watch []string `json:"watch,omitempty"`
}
BuildConfig represents build configuration
type Component ¶
type Component struct {
ID string `json:"id"`
Source ComponentSource `json:"-"` // Exclude from automatic JSON marshaling
Build *BuildConfig `json:"build,omitempty"`
Variables map[string]string `json:"variables,omitempty"`
}
Component represents a validated component
func (Component) MarshalJSON ¶
MarshalJSON implements custom JSON marshaling for Component to handle the Source interface
type ComponentSource ¶
type ComponentSource interface {
// contains filtered or unexported methods
}
ComponentSource is either local or registry
type LocalSource ¶
type LocalSource struct {
Path string `json:"path"`
}
LocalSource represents a local component source
type RegistrySource ¶
type RegistrySource struct {
Registry string `json:"registry"`
Package string `json:"package"`
Version string `json:"version"`
}
RegistrySource represents a registry component source
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator provides CUE-based validation for FTL configurations
func (*Validator) ValidateCUE ¶
ValidateCUE validates CUE configuration against FTL schema
func (*Validator) ValidateJSON ¶
ValidateJSON validates JSON configuration against FTL schema