Documentation
¶
Overview ¶
Package config provides configuration parsing for Vango projects.
The configuration is stored in vango.json at the project root. This package handles loading, saving, and validating configuration.
Configuration File Structure ¶
{
"dev": {
"port": 8000,
"appPort": 8888,
"host": "localhost",
"openBrowser": true,
"https": false,
"proxy": {
"/api/external": "https://api.example.com"
}
},
"build": {
"output": "dist",
"minify": true,
"sourceMaps": false
},
"tailwind": {
"enabled": true,
"config": "./tailwind.config.js"
},
"ui": {
"version": "1.0.0",
"registry": "https://vango.dev/registry.json",
"installed": ["button", "card"]
},
"hooks": "./public/js/hooks.js"
}
Usage ¶
cfg, err := config.Load(".")
if err != nil {
log.Fatal(err)
}
fmt.Println("Port:", cfg.Dev.Port)
Index ¶
- Constants
- func Exists(dir string) bool
- func FindProjectRoot(startDir string) (string, error)
- func LoadFromEnv(cfg *SessionConfig)
- func NormalizeIOSTrustedHostedOrigins(baseURL string, values []string) []string
- func NormalizeMacOSTrustedHostedOrigins(baseURL string, values []string) []string
- func ParseSessionStoreURL(raw string) (session.SessionStore, error)
- func ValidateIOSTrustedHostedOrigins(baseURL string, values []string) error
- func ValidateMacOSTrustedHostedOrigins(baseURL string, values []string) error
- type BlobConfig
- type BlobProviderProofConfig
- type BuildConfig
- type Config
- func (c *Config) ComponentsPath() string
- func (c *Config) DevAddress() string
- func (c *Config) DevURL() string
- func (c *Config) Dir() string
- func (c *Config) EffectiveNeonProjectID() string
- func (c *Config) HasIOSTarget() bool
- func (c *Config) HasMacOSTarget() bool
- func (c *Config) HasTailwind() bool
- func (c *Config) IsPlatformSealed() bool
- func (c *Config) IsStrictCI() bool
- func (c *Config) MiddlewarePath() string
- func (c *Config) OutputPath() string
- func (c *Config) Path() string
- func (c *Config) PublicPath() string
- func (c *Config) ResolveIOSTarget() ResolvedIOSTarget
- func (c *Config) ResolveMacOSTarget() ResolvedMacOSTarget
- func (c *Config) RoutesOutputPath() string
- func (c *Config) RoutesPath() string
- func (c *Config) Save() error
- func (c *Config) SaveTo(path string) error
- func (c *Config) StaticPrefix() string
- func (c *Config) StorePath() string
- func (c *Config) StrictMode() string
- func (c *Config) TailwindConfigPath() string
- func (c *Config) UIComponentsPath() string
- func (c *Config) Validate() error
- type CustomGeneratorConfig
- type DatabaseBindingConfig
- type DatabaseBootstrapConfig
- type DatabaseChecksConfig
- type DatabaseConfig
- type DatabaseCredentialsConfig
- type DatabaseEngineConfig
- type DatabaseMigrationPolicyConfig
- type DatabaseMigrationsConfig
- type DatabaseProviderExpectationsConfig
- type DatabaseRegionEnablementConfig
- type DatabaseSchemaSnapshotConfig
- type DatabaseTopologyConfig
- type DatabaseTopologyPartitioningConfig
- type DevConfig
- type IOSAppConfig
- type IOSCapabilitiesConfig
- type IOSConfig
- type IOSPushConfig
- type IOSReleaseConfig
- type IOSRuntimeConfig
- type IOSSignInWithAppleConfig
- type IOSStoreKitConfig
- type MacOSAppConfig
- type MacOSConfig
- type MacOSReleaseConfig
- type MacOSRuntimeConfig
- type NeonConfig
- type PathsConfig
- type PlatformConfig
- type ResolvedIOSTarget
- type ResolvedMacOSTarget
- type RoutesConfig
- type RuntimePlatform
- type RuntimeServiceConfig
- type RuntimeServicesConfig
- type SessionConfig
- type StaticConfig
- type TailwindConfig
- type UIConfig
Constants ¶
const ( // ConfigFileName is the name of the configuration file. ConfigFileName = "vango.json" // DefaultPort is the default development server port. DefaultPort = 8000 // DefaultAppPort is the default backend app process port in dev mode. DefaultAppPort = 8888 // DefaultHost is the default development server host. DefaultHost = "localhost" // DefaultOutput is the default build output directory. DefaultOutput = "dist" // DefaultRegistry is the default component registry URL. DefaultRegistry = "https://vango.dev/registry.json" )
const ( EnvSessionStoreURL = "VANGO_SESSION_STORE_URL" EnvPubSubURL = "VANGO_PUBSUB_URL" EnvBlobsURL = "VANGO_BLOBS_URL" EnvCacheURL = "VANGO_CACHE_URL" EnvPersistenceSecret = "VANGO_PERSISTENCE_SECRET" EnvPersistenceSecretPrevious = "VANGO_PERSISTENCE_SECRET_PREVIOUS" EnvPlatformSealed = "VANGO_PLATFORM_SEALED" EnvEnvironment = "VANGO_ENV" EnvStrict = "VANGO_STRICT" )
Variables ¶
This section is empty.
Functions ¶
func FindProjectRoot ¶
FindProjectRoot walks up directories to find the project root. Returns the directory containing vango.json, or an error if not found.
func LoadFromEnv ¶
func LoadFromEnv(cfg *SessionConfig)
LoadFromEnv populates session config from environment variables. Invalid values are ignored to keep startup non-fatal.
func NormalizeIOSTrustedHostedOrigins ¶ added in v0.2.0
NormalizeIOSTrustedHostedOrigins returns the normalized allowlist for hosted iPhone mode. The hosted base origin is always included first when valid, and any additional origins must remain on the same first-party registrable domain.
func NormalizeMacOSTrustedHostedOrigins ¶ added in v0.2.0
NormalizeMacOSTrustedHostedOrigins returns the normalized allowlist for hosted macOS desktop mode. The hosted base origin is always included first when valid, and additional origins must remain on the same first-party registrable domain.
func ParseSessionStoreURL ¶
func ParseSessionStoreURL(raw string) (session.SessionStore, error)
ParseSessionStoreURL creates a SessionStore from a URL.
func ValidateIOSTrustedHostedOrigins ¶ added in v0.2.0
ValidateIOSTrustedHostedOrigins enforces the first-party hosted iPhone posture: a product-owned HTTPS base URL plus same-owner allowed origins.
func ValidateMacOSTrustedHostedOrigins ¶ added in v0.2.0
ValidateMacOSTrustedHostedOrigins enforces the first-party hosted macOS posture: a product-owned HTTPS base URL plus same-owner allowed origins.
Types ¶
type BlobConfig ¶ added in v0.0.2
type BlobConfig struct {
Enabled bool `json:"enabled,omitempty"`
// Provider is the scaffolded provider identifier ("r2" or "s3").
Provider string `json:"provider,omitempty"`
// TmpCleanupConfigured indicates a lifecycle rule exists that deletes objects under tmp/
// after a short retention window (recommended: 24h). When false, `vango dev` may warn.
TmpCleanupConfigured bool `json:"tmp_cleanup_configured,omitempty"`
// TenantKeyScope declares the storage key isolation model. Recognized values
// are "single_tenant_default" and "tenant_prefix".
TenantKeyScope string `json:"tenant_key_scope,omitempty"`
// AllowInsecurePromoteWithoutETag mirrors vango-s3's reduced-security escape
// hatch. Production readiness treats this as blocked until explicitly reviewed.
AllowInsecurePromoteWithoutETag bool `json:"allow_insecure_promote_without_etag,omitempty"`
// ProviderProof records host/provider evidence required for production promotion.
ProviderProof BlobProviderProofConfig `json:"provider_proof,omitempty"`
}
BlobConfig configures optional blob storage scaffolding and CLI advisories.
type BlobProviderProofConfig ¶ added in v0.2.0
type BlobProviderProofConfig struct {
BucketIdentity bool `json:"bucket_identity,omitempty"`
CORS bool `json:"cors,omitempty"`
IAMPrefixScope bool `json:"iam_prefix_scope,omitempty"`
LifecycleCleanup bool `json:"lifecycle_cleanup,omitempty"`
ConditionalPromote bool `json:"conditional_promote,omitempty"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
}
BlobProviderProofConfig records provider-side object-storage proof.
type BuildConfig ¶
type BuildConfig struct {
// Output is the output directory for builds.
Output string `json:"output,omitempty"`
// Minify enables minification.
Minify bool `json:"minify,omitempty"`
// MinifyAssets enables minification of CSS and JS assets.
MinifyAssets bool `json:"minifyAssets,omitempty"`
// StripSymbols strips debug symbols from the binary (-ldflags="-s -w").
StripSymbols bool `json:"stripSymbols,omitempty"`
// SourceMaps enables source map generation.
SourceMaps bool `json:"sourceMaps,omitempty"`
// Target is the Go build target (e.g., "linux/amd64").
Target string `json:"target,omitempty"`
// LDFlags are additional linker flags for go build.
LDFlags string `json:"ldflags,omitempty"`
// Tags are build tags to pass to go build.
Tags []string `json:"tags,omitempty"`
// GeneratorInputs are inputs that affect generated code and build schema.
GeneratorInputs []string `json:"generatorInputs,omitempty"`
// CustomGenerators declares app-local or external generators whose outputs
// should appear in Vango codegen ownership, manifest, verify, and plan facts.
CustomGenerators []CustomGeneratorConfig `json:"customGenerators,omitempty"`
}
BuildConfig contains production build settings.
type Config ¶
type Config struct {
// Module is the Go module path (must match go.mod).
Module string `json:"module,omitempty"`
// Name is the project name.
Name string `json:"name,omitempty"`
// Version is the project version.
Version string `json:"version,omitempty"`
// Strict controls lint strict mode (default, ci).
Strict string `json:"strict,omitempty"`
// Platform contains platform-specific configuration.
Platform PlatformConfig `json:"platform,omitempty"`
// Neon contains Neon-specific configuration.
Neon NeonConfig `json:"neon,omitempty"`
// Database declares application database requirements for Vango contract artifacts.
Database DatabaseConfig `json:"database,omitempty"`
// Blob contains blob storage scaffolding configuration (vango-s3 integration).
// This is currently used for CLI advisory checks and template scaffolding only.
Blob BlobConfig `json:"blob,omitempty"`
// RuntimeServices declares app-owned runtime services that source scanning
// cannot infer, such as product caches, durable queues, and outboxes.
RuntimeServices RuntimeServicesConfig `json:"runtime_services,omitempty"`
// Port is the default server port (convenience field, also in Dev).
Port int `json:"port,omitempty"`
// Routes configures file-based routing generation.
Routes RoutesConfig `json:"routes,omitempty"`
// Paths contains path configuration for various directories.
Paths PathsConfig `json:"paths,omitempty"`
// Static contains static file serving configuration.
Static StaticConfig `json:"static,omitempty"`
// Dev contains development server configuration.
Dev DevConfig `json:"dev,omitempty"`
// Build contains production build configuration.
Build BuildConfig `json:"build,omitempty"`
// Tailwind contains Tailwind CSS configuration.
Tailwind TailwindConfig `json:"tailwind,omitempty"`
// Session contains session configuration.
Session SessionConfig `json:"session,omitempty"`
// UI contains VangoUI component configuration (legacy, use Paths.UI).
UI UIConfig `json:"ui,omitempty"`
// Hooks is the path to custom client hooks JavaScript file.
Hooks string `json:"hooks,omitempty"`
// Components is the path to the components directory (legacy, use Paths.Components).
Components string `json:"components,omitempty"`
// Public is the path to the public static files directory (legacy, use Static.Dir).
Public string `json:"public,omitempty"`
// contains filtered or unexported fields
}
Config represents the complete vango.json configuration. This is aligned with the v1 schema in DEVELOPER_GUIDE.md Appendix C.
func Load ¶
Load reads configuration from the specified directory. It looks for vango.json in the directory.
func LoadFromWorkingDir ¶
LoadFromWorkingDir loads configuration from the current working directory.
func (*Config) ComponentsPath ¶
ComponentsPath returns the absolute path to the components directory.
func (*Config) DevAddress ¶
DevAddress returns the address string for the dev server.
func (*Config) EffectiveNeonProjectID ¶ added in v0.0.2
EffectiveNeonProjectID returns the Neon project ID to use for CLI operations.
NEON_PROJECT_ID takes precedence over vango.json.
func (*Config) HasIOSTarget ¶ added in v0.0.3
HasIOSTarget reports whether an iOS target is configured.
func (*Config) HasMacOSTarget ¶ added in v0.0.3
HasMacOSTarget reports whether a macOS desktop target is configured.
func (*Config) HasTailwind ¶
HasTailwind returns true if Tailwind CSS is enabled.
func (*Config) IsPlatformSealed ¶
IsPlatformSealed returns true when platform config is sealed.
func (*Config) IsStrictCI ¶
IsStrictCI returns true when strict mode is set to CI.
func (*Config) MiddlewarePath ¶
MiddlewarePath returns the absolute path to the middleware directory.
func (*Config) OutputPath ¶
OutputPath returns the absolute path to the build output directory.
func (*Config) PublicPath ¶
PublicPath returns the absolute path to the public directory.
func (*Config) ResolveIOSTarget ¶ added in v0.0.3
func (c *Config) ResolveIOSTarget() ResolvedIOSTarget
ResolveIOSTarget returns the normalized iOS target configuration.
func (*Config) ResolveMacOSTarget ¶ added in v0.0.3
func (c *Config) ResolveMacOSTarget() ResolvedMacOSTarget
ResolveMacOSTarget returns the normalized macOS target configuration.
func (*Config) RoutesOutputPath ¶
RoutesOutputPath returns the absolute path to the generated routes file.
func (*Config) RoutesPath ¶
RoutesPath returns the absolute path to the routes directory.
func (*Config) StaticPrefix ¶
StaticPrefix returns the URL prefix for static files.
func (*Config) StrictMode ¶
StrictMode returns the effective strict mode (env overrides config).
func (*Config) TailwindConfigPath ¶
TailwindConfigPath returns the absolute path to the Tailwind config.
func (*Config) UIComponentsPath ¶
UIComponentsPath returns the absolute path to the UI components directory.
type CustomGeneratorConfig ¶ added in v0.2.0
type CustomGeneratorConfig struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Kind string `json:"kind,omitempty"`
Command string `json:"command,omitempty"`
Inputs []string `json:"inputs,omitempty"`
Outputs []string `json:"outputs,omitempty"`
Targets []string `json:"targets,omitempty"`
StructuredManifest string `json:"structuredManifest,omitempty"`
Deterministic bool `json:"deterministic,omitempty"`
}
CustomGeneratorConfig declares a non-first-party code generator.
type DatabaseBindingConfig ¶ added in v0.2.0
type DatabaseBindingConfig struct {
Name string `json:"name,omitempty"`
Required bool `json:"required,omitempty"`
Purpose string `json:"purpose,omitempty"`
Engine DatabaseEngineConfig `json:"engine,omitempty"`
ProviderExpectations DatabaseProviderExpectationsConfig `json:"providerExpectations,omitempty"`
Credentials DatabaseCredentialsConfig `json:"credentials,omitempty"`
Migrations DatabaseMigrationsConfig `json:"migrations,omitempty"`
Bootstrap DatabaseBootstrapConfig `json:"bootstrap,omitempty"`
Checks DatabaseChecksConfig `json:"checks,omitempty"`
SchemaSnapshot DatabaseSchemaSnapshotConfig `json:"schemaSnapshot,omitempty"`
MigrationPolicy DatabaseMigrationPolicyConfig `json:"migrationPolicy,omitempty"`
Topology DatabaseTopologyConfig `json:"topology,omitempty"`
}
DatabaseBindingConfig declares one host-visible database binding.
type DatabaseBootstrapConfig ¶ added in v0.2.0
type DatabaseChecksConfig ¶ added in v0.2.0
type DatabaseChecksConfig struct {
PostFreshSQL []string `json:"postFreshSQL,omitempty"`
}
type DatabaseConfig ¶ added in v0.2.0
type DatabaseConfig struct {
Mode string `json:"mode,omitempty"`
Bindings []DatabaseBindingConfig `json:"bindings,omitempty"`
}
DatabaseConfig declares database contract inputs. Vango uses this for source validation and deploy-impact artifacts; it does not open connections or run production migrations.
type DatabaseCredentialsConfig ¶ added in v0.2.0
type DatabaseCredentialsConfig struct {
RuntimeEnv string `json:"runtimeEnv,omitempty"`
MigrationEnv string `json:"migrationEnv,omitempty"`
AdminEnv string `json:"adminEnv,omitempty"`
ValidationEnv string `json:"validationEnv,omitempty"`
ReadOnlyEnv string `json:"readOnlyEnv,omitempty"`
MigrationRequiresDirect bool `json:"migrationRequiresDirect,omitempty"`
}
type DatabaseEngineConfig ¶ added in v0.2.0
type DatabaseMigrationPolicyConfig ¶ added in v0.2.0
type DatabaseMigrationPolicyConfig struct {
ProductionApply string `json:"productionApply,omitempty"`
StartupApplyAllowed string `json:"startupApplyAllowed,omitempty"`
DestructiveRequiresReview bool `json:"destructiveRequiresReview,omitempty"`
DataMigrationRequiresReview bool `json:"dataMigrationRequiresReview,omitempty"`
}
type DatabaseMigrationsConfig ¶ added in v0.2.0
type DatabaseMigrationsConfig struct {
Tool string `json:"tool,omitempty"`
Dialect string `json:"dialect,omitempty"`
Directories []string `json:"directories,omitempty"`
EmbedPattern string `json:"embedPattern,omitempty"`
Table string `json:"table,omitempty"`
AllowOutOfOrder bool `json:"allowOutOfOrder,omitempty"`
}
type DatabaseProviderExpectationsConfig ¶ added in v0.2.0
type DatabaseProviderExpectationsConfig struct {
Provider string `json:"provider,omitempty"`
RuntimeMayBePooled bool `json:"runtimeMayBePooled,omitempty"`
MigrationMustBeDirect bool `json:"migrationMustBeDirect,omitempty"`
TLSRequired bool `json:"tlsRequired,omitempty"`
ChannelBindingRecommended bool `json:"channelBindingRecommended,omitempty"`
}
type DatabaseRegionEnablementConfig ¶ added in v0.2.0
type DatabaseRegionEnablementConfig struct {
CanPrepareNewCellFromRepo bool `json:"canPrepareNewCellFromRepo,omitempty"`
RequiresBootstrapData bool `json:"requiresBootstrapData,omitempty"`
RequiresDataCopy bool `json:"requiresDataCopy,omitempty"`
RequiresProviderCaps []string `json:"requiresProviderCapabilities,omitempty"`
}
type DatabaseSchemaSnapshotConfig ¶ added in v0.2.0
type DatabaseTopologyConfig ¶ added in v0.2.0
type DatabaseTopologyConfig struct {
SupportedModes []string `json:"supportedModes,omitempty"`
DefaultMode string `json:"defaultMode,omitempty"`
CellLocalReady bool `json:"cellLocalReady,omitempty"`
TenantHomeRegionReady bool `json:"tenantHomeRegionReady,omitempty"`
GlobalDatabaseReady bool `json:"globalDatabaseReady,omitempty"`
Partitioning DatabaseTopologyPartitioningConfig `json:"partitioning,omitempty"`
RegionEnablement DatabaseRegionEnablementConfig `json:"regionEnablement,omitempty"`
}
type DatabaseTopologyPartitioningConfig ¶ added in v0.2.0
type DevConfig ¶
type DevConfig struct {
// Port is the port to run the dev server on.
Port int `json:"port,omitempty"`
// AppPort is the backend application process port used by the dev proxy.
AppPort int `json:"appPort,omitempty"`
// Host is the host to bind to.
Host string `json:"host,omitempty"`
// OpenBrowser opens the browser automatically on start.
OpenBrowser bool `json:"openBrowser,omitempty"`
// HTTPS enables HTTPS for the dev server.
HTTPS bool `json:"https,omitempty"`
// Proxy contains proxy rules for forwarding requests.
Proxy map[string]string `json:"proxy,omitempty"`
// Watch contains paths to watch for changes.
Watch []string `json:"watch,omitempty"`
// Ignore contains patterns to ignore during watch.
Ignore []string `json:"ignore,omitempty"`
// HotReload enables hot reload in development.
HotReload bool `json:"hotReload,omitempty"`
}
DevConfig contains development server settings.
type IOSAppConfig ¶ added in v0.0.3
type IOSAppConfig struct {
DisplayName string `json:"displayName,omitempty"`
BundleID string `json:"bundleID,omitempty"`
MinimumVersion string `json:"minimumVersion,omitempty"`
URLSchemes []string `json:"urlSchemes,omitempty"`
}
IOSAppConfig configures bundle metadata for the iOS host.
type IOSCapabilitiesConfig ¶ added in v0.2.0
type IOSCapabilitiesConfig struct {
AssociatedDomains []string `json:"associatedDomains,omitempty"`
BackgroundModes []string `json:"backgroundModes,omitempty"`
AppGroups []string `json:"appGroups,omitempty"`
KeychainAccessGroups []string `json:"keychainAccessGroups,omitempty"`
Push IOSPushConfig `json:"push,omitempty"`
SignInWithApple IOSSignInWithAppleConfig `json:"signInWithApple,omitempty"`
StoreKit IOSStoreKitConfig `json:"storeKit,omitempty"`
}
IOSCapabilitiesConfig configures optional iOS packaging capabilities that affect entitlements, Info.plist generation, and App Store review posture.
type IOSConfig ¶ added in v0.0.3
type IOSConfig struct {
Enabled bool `json:"enabled,omitempty"`
App IOSAppConfig `json:"app,omitempty"`
Runtime IOSRuntimeConfig `json:"runtime,omitempty"`
Release IOSReleaseConfig `json:"release,omitempty"`
Capabilities IOSCapabilitiesConfig `json:"capabilities,omitempty"`
}
IOSConfig configures the native iOS mobile target.
type IOSPushConfig ¶ added in v0.2.0
type IOSPushConfig struct {
Enabled bool `json:"enabled,omitempty"`
}
IOSPushConfig enables the APNs entitlement baseline. It does not implement remote push runtime support by itself.
type IOSReleaseConfig ¶ added in v0.0.3
type IOSReleaseConfig struct {
SigningIdentity string `json:"signingIdentity,omitempty"`
TeamID string `json:"teamID,omitempty"`
ProvisioningProfile string `json:"provisioningProfile,omitempty"`
SigningStyle string `json:"signingStyle,omitempty"`
ExportMethod string `json:"exportMethod,omitempty"`
BuildChannel string `json:"buildChannel,omitempty"`
}
IOSReleaseConfig configures code signing and archive behavior for the iOS host.
type IOSRuntimeConfig ¶ added in v0.0.3
type IOSRuntimeConfig struct {
BridgePackage string `json:"bridgePackage,omitempty"`
Topology string `json:"topology,omitempty"`
HostedBaseURL string `json:"hostedBaseURL,omitempty"`
HostedAllowedOrigins []string `json:"hostedAllowedOrigins,omitempty"`
HostedSurfaceProofSecretEnv string `json:"hostedSurfaceProofSecretEnv,omitempty"`
}
IOSRuntimeConfig configures runtime behavior for the iOS host.
type IOSSignInWithAppleConfig ¶ added in v0.2.0
type IOSSignInWithAppleConfig struct {
Enabled bool `json:"enabled,omitempty"`
}
IOSSignInWithAppleConfig enables the Sign in with Apple entitlement baseline. It does not provide a complete native auth flow by itself.
type IOSStoreKitConfig ¶ added in v0.2.0
type IOSStoreKitConfig struct {
Enabled bool `json:"enabled,omitempty"`
}
IOSStoreKitConfig enables native StoreKit support for App Store digital purchases.
type MacOSAppConfig ¶ added in v0.0.3
type MacOSAppConfig struct {
DisplayName string `json:"displayName,omitempty"`
BundleID string `json:"bundleID,omitempty"`
ExecutableName string `json:"executableName,omitempty"`
Category string `json:"category,omitempty"`
MinimumVersion string `json:"minimumVersion,omitempty"`
URLSchemes []string `json:"urlSchemes,omitempty"`
}
MacOSAppConfig configures bundle metadata for the macOS host.
type MacOSConfig ¶ added in v0.0.3
type MacOSConfig struct {
Enabled bool `json:"enabled,omitempty"`
App MacOSAppConfig `json:"app,omitempty"`
Runtime MacOSRuntimeConfig `json:"runtime,omitempty"`
Release MacOSReleaseConfig `json:"release,omitempty"`
}
MacOSConfig configures the native macOS desktop target.
type MacOSReleaseConfig ¶ added in v0.0.3
type MacOSReleaseConfig struct {
SigningIdentity string `json:"signingIdentity,omitempty"`
TeamID string `json:"teamID,omitempty"`
NotaryProfile string `json:"notaryProfile,omitempty"`
}
MacOSReleaseConfig configures release signing/notarization metadata.
type MacOSRuntimeConfig ¶ added in v0.0.3
type MacOSRuntimeConfig struct {
BridgePackage string `json:"bridgePackage,omitempty"`
Topology string `json:"topology,omitempty"`
HostedBaseURL string `json:"hostedBaseURL,omitempty"`
HostedAllowedOrigins []string `json:"hostedAllowedOrigins,omitempty"`
HostedSurfaceProofSecretEnv string `json:"hostedSurfaceProofSecretEnv,omitempty"`
RestorePolicy string `json:"restorePolicy,omitempty"`
}
MacOSRuntimeConfig configures runtime behavior for the macOS host.
type NeonConfig ¶ added in v0.0.2
type NeonConfig struct {
// Enabled enables Neon-aware CLI features.
Enabled bool `json:"enabled,omitempty"`
// ProjectID is the Neon project ID. This value is overridden by the
// NEON_PROJECT_ID environment variable when set.
ProjectID string `json:"project_id,omitempty"`
// BranchDetection enables the vango dev informational branch check. If unset,
// the default is true.
BranchDetection *bool `json:"branch_detection,omitempty"`
}
NeonConfig configures optional Neon-aware CLI behavior.
This configuration enables informational tooling in the vango CLI; it does not change runtime database connection behavior by itself.
func (NeonConfig) BranchDetectionEnabled ¶ added in v0.0.2
func (n NeonConfig) BranchDetectionEnabled() bool
BranchDetectionEnabled returns whether branch detection should run. The default is true when BranchDetection is unset.
type PathsConfig ¶
type PathsConfig struct {
// Components is the path to the components directory.
Components string `json:"components,omitempty"`
// UI is the path to the UI components directory.
UI string `json:"ui,omitempty"`
// Store is the path to the store directory.
Store string `json:"store,omitempty"`
// Middleware is the path to the middleware directory.
Middleware string `json:"middleware,omitempty"`
}
PathsConfig contains path configuration for project directories.
type PlatformConfig ¶
type PlatformConfig struct {
// Sealed prevents app config from overriding platform settings.
Sealed bool `json:"sealed,omitempty"`
// Name is the platform identifier (for logging/display).
Name string `json:"name,omitempty"`
// MacOS configures the native macOS desktop target.
MacOS MacOSConfig `json:"macos,omitempty"`
// IOS configures the native iOS mobile target.
IOS IOSConfig `json:"ios,omitempty"`
}
PlatformConfig contains platform-specific settings.
type ResolvedIOSTarget ¶ added in v0.0.3
type ResolvedIOSTarget struct {
Enabled bool
AppName string
BundleID string
MinimumSystem string
URLSchemes []string
BridgePackage string
Topology string
HostedBaseURL string
HostedOrigins []string
HostedSurfaceProofSecretEnv string
OutputDir string
AppVersion string
AppBuild string
BuildChannel string
ReleaseBuildChannel string
SigningIdentity string
TeamID string
ProvisioningProfile string
SigningStyle string
ExportMethod string
SchemeName string
ApplicationModule string
AssociatedDomains []string
BackgroundModes []string
AppGroups []string
KeychainAccessGroups []string
PushEnabled bool
SignInWithAppleEnabled bool
StoreKitEnabled bool
}
ResolvedIOSTarget contains the normalized iOS target configuration consumed by the CLI, native host build scripts, and archive pipeline.
type ResolvedMacOSTarget ¶ added in v0.0.3
type ResolvedMacOSTarget struct {
Enabled bool
AppName string
ExecutableName string
BundleID string
AppCategory string
MinimumSystem string
URLSchemes []string
BridgePackage string
Topology string
HostedBaseURL string
HostedOrigins []string
HostedSurfaceProofSecretEnv string
RestorePolicy string
OutputDir string
AppVersion string
AppBuild string
BuildChannel string
SigningIdentity string
TeamID string
NotaryProfile string
ApplicationModule string
}
ResolvedMacOSTarget contains the normalized macOS target configuration that the CLI, host build scripts, and packaging pipeline consume.
type RoutesConfig ¶
type RoutesConfig struct {
// Dir is the path to the routes directory.
Dir string `json:"dir,omitempty"`
// Output is the output file path for generated routes glue.
Output string `json:"output,omitempty"`
// Package is the Go package name for generated routes glue.
Package string `json:"package,omitempty"`
}
RoutesConfig contains file-based routing configuration.
type RuntimePlatform ¶
type RuntimePlatform struct {
// SessionStoreURL is the session persistence backend URL.
SessionStoreURL string
// PubSubURL is the broadcast/pubsub backend URL.
PubSubURL string
// BlobsURL is the blob storage backend URL.
BlobsURL string
// CacheURL is the cache backend URL.
CacheURL string
// PersistenceSecret is the HMAC secret for persistence blobs.
PersistenceSecret string
// PersistenceSecretPrevious is the previous HMAC secret for rotation.
PersistenceSecretPrevious string
// Environment is the runtime environment (dev/staging/production).
Environment string
// Name is the platform identifier (optional).
Name string
// Sealed prevents app overrides.
Sealed bool
}
RuntimePlatform contains resolved platform configuration.
func ResolvePlatform ¶
func ResolvePlatform(cfg *Config) *RuntimePlatform
ResolvePlatform resolves platform configuration from config and environment.
func (*RuntimePlatform) HasBroadcast ¶
func (rp *RuntimePlatform) HasBroadcast() bool
HasBroadcast returns true if a pubsub backend is configured.
func (*RuntimePlatform) HasPersistence ¶
func (rp *RuntimePlatform) HasPersistence() bool
HasPersistence returns true if a session store is configured.
type RuntimeServiceConfig ¶ added in v0.2.0
type RuntimeServiceConfig struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Class string `json:"class,omitempty"`
Required bool `json:"required,omitempty"`
RequiredFor []string `json:"required_for,omitempty"`
Scopes []string `json:"scopes,omitempty"`
EnvRefs []string `json:"env_refs,omitempty"`
ProviderProfile string `json:"provider_profile,omitempty"`
AcceptableProviders []string `json:"acceptable_providers,omitempty"`
RequiredCapabilities []string `json:"required_capabilities,omitempty"`
Degradation []string `json:"degradation,omitempty"`
}
RuntimeServiceConfig declares one app-owned runtime service requirement.
type RuntimeServicesConfig ¶ added in v0.2.0
type RuntimeServicesConfig struct {
Services []RuntimeServiceConfig `json:"services,omitempty"`
}
RuntimeServicesConfig declares app-owned runtime service requirements.
type SessionConfig ¶
type SessionConfig struct {
// ResumeWindow is the duration for session resumption (e.g., "30s").
ResumeWindow string `json:"resumeWindow,omitempty"`
// Store is the session persistence backend (env-only).
Store session.SessionStore `json:"-"`
// PersistenceSecret signs persisted session blobs (env-only).
PersistenceSecret []byte `json:"-"`
// PersistenceSecretPrevious allows secret rotation (env-only).
PersistenceSecretPrevious []byte `json:"-"`
}
SessionConfig contains session configuration.
type StaticConfig ¶
type StaticConfig struct {
// Dir is the directory containing static files.
Dir string `json:"dir,omitempty"`
// Prefix is the URL prefix for static files (default: "/").
Prefix string `json:"prefix,omitempty"`
}
StaticConfig contains static file serving configuration.
type TailwindConfig ¶
type TailwindConfig struct {
// Enabled controls whether Tailwind CSS is used.
Enabled bool `json:"enabled,omitempty"`
// Config is the path to tailwind.config.js.
Config string `json:"config,omitempty"`
// Input is the input CSS file.
Input string `json:"input,omitempty"`
// Output is the output CSS file.
Output string `json:"output,omitempty"`
}
TailwindConfig contains Tailwind CSS settings.
type UIConfig ¶
type UIConfig struct {
// Version is the pinned VangoUI version.
Version string `json:"version,omitempty"`
// Registry is the URL to the component registry.
Registry string `json:"registry,omitempty"`
// Installed is the list of installed components.
Installed []string `json:"installed,omitempty"`
// Path is the path where UI components are stored.
Path string `json:"path,omitempty"`
}
UIConfig contains VangoUI component settings.