contract

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaVersion     = "vango.object_storage.upload.v1.0"
	ArtifactKind      = "vango_object_storage_upload_profile"
	DefaultOutputPath = ".vango/storage/vango_object_storage_upload_profile.json"
)

Variables

This section is empty.

Functions

func MarshalDeterministic

func MarshalDeterministic(c *Contract) ([]byte, error)

func Write

func Write(path string, c *Contract) error

Types

type BuildOptions

type BuildOptions struct {
	ProjectRoot     string
	Name            string
	Module          string
	AppVersion      string
	ToolVersion     string
	Commit          string
	OutputPath      string
	Config          *config.Config
	RouteContract   *routecontract.Contract
	RuntimeServices *runtimeservices.Artifact
	EnvContract     *envcontract.Contract
	AuthContract    *authcontract.Contract
}

type Contract

type Contract struct {
	SchemaVersion      string                          `json:"schema_version"`
	ArtifactID         string                          `json:"artifact_id"`
	ArtifactKind       string                          `json:"artifact_kind"`
	Producer           artifact.Producer               `json:"producer"`
	App                artifact.App                    `json:"app"`
	Analysis           artifact.Analysis               `json:"analysis"`
	Storage            StorageBinding                  `json:"storage"`
	UploadFlows        []UploadFlow                    `json:"upload_flows"`
	Security           SecurityPosture                 `json:"security"`
	ProviderProof      ProviderProofPosture            `json:"provider_proof"`
	ProviderProfiles   []artifact.ProfileFact          `json:"provider_profiles"`
	ControlProfiles    []artifact.ProfileFact          `json:"control_profiles"`
	OperationReadiness []artifact.OperationReadiness   `json:"operation_readiness"`
	Inputs             []artifact.ArtifactRef          `json:"inputs"`
	Outputs            []artifact.ArtifactRef          `json:"outputs"`
	References         map[string]artifact.ArtifactRef `json:"references"`
	Diagnostics        []artifact.Diagnostic           `json:"diagnostics"`
}

func Build

func Build(opts BuildOptions) (*Contract, error)

type DeliveryPosture

type DeliveryPosture struct {
	PrivateByDefault bool   `json:"private_by_default"`
	Mode             string `json:"mode"`
}

type IdempotencyPosture

type IdempotencyPosture struct {
	Required bool   `json:"required"`
	Status   string `json:"status"`
	StoreRef string `json:"store_ref,omitempty"`
}

type PresignedURLPosture

type PresignedURLPosture struct {
	Used             bool   `json:"used"`
	BearerCredential bool   `json:"bearer_credential"`
	RedactionStatus  string `json:"redaction_status"`
	Expiry           string `json:"expiry,omitempty"`
}

type PromotePosture

type PromotePosture struct {
	ConditionalCopyRequired bool   `json:"conditional_copy_required"`
	InsecureFallbackAllowed bool   `json:"insecure_fallback_allowed"`
	Status                  string `json:"status"`
}

type ProviderProofPosture

type ProviderProofPosture struct {
	Required            bool     `json:"required"`
	BucketIdentity      bool     `json:"bucket_identity"`
	CORS                bool     `json:"cors"`
	IAMPrefixScope      bool     `json:"iam_prefix_scope"`
	LifecycleCleanup    bool     `json:"lifecycle_cleanup"`
	ConditionalPromote  bool     `json:"conditional_promote"`
	EvidenceRefs        []string `json:"evidence_refs"`
	MissingEvidence     []string `json:"missing_evidence"`
	ProductionReady     bool     `json:"production_ready"`
	ProductionReadyText string   `json:"production_ready_text"`
}

type SecurityPosture

type SecurityPosture struct {
	PresignedURLsRedacted bool `json:"presigned_urls_redacted"`
	IntentTokensRedacted  bool `json:"intent_tokens_redacted"`
	SecretValuesInProfile bool `json:"secret_values_in_profile"`
}

type StorageBinding

type StorageBinding struct {
	Enabled              bool                `json:"enabled"`
	ProviderProfile      string              `json:"provider_profile,omitempty"`
	RuntimeServiceID     string              `json:"runtime_service_id,omitempty"`
	RuntimeServiceStatus string              `json:"runtime_service_status"`
	RequiredEnv          []string            `json:"required_env"`
	Origin               artifact.Origin     `json:"origin"`
	ProofLevel           artifact.ProofLevel `json:"proof_level"`
	SourceRef            artifact.SourceRef  `json:"source_ref,omitempty"`
}

type TempCleanupPosture

type TempCleanupPosture struct {
	Required         bool   `json:"required"`
	Status           string `json:"status"`
	TempPrefix       string `json:"temp_prefix"`
	Retention        string `json:"retention,omitempty"`
	HostRuleRequired bool   `json:"host_rule_required"`
}

type TenantKeyPosture

type TenantKeyPosture struct {
	Required bool   `json:"required"`
	Status   string `json:"status"`
	Model    string `json:"model,omitempty"`
}

type UploadFlow

type UploadFlow struct {
	ID              string              `json:"id"`
	Lifecycle       string              `json:"lifecycle"`
	IntentRouteID   string              `json:"intent_route_id,omitempty"`
	ClaimRouteID    string              `json:"claim_route_id,omitempty"`
	Idempotency     IdempotencyPosture  `json:"idempotency"`
	TempCleanup     TempCleanupPosture  `json:"temp_cleanup"`
	Promote         PromotePosture      `json:"promote"`
	TenantKeyScope  TenantKeyPosture    `json:"tenant_key_scope"`
	PresignedPUT    PresignedURLPosture `json:"presigned_put"`
	PresignedGET    PresignedURLPosture `json:"presigned_get"`
	Delivery        DeliveryPosture     `json:"delivery"`
	RequiredEnv     []string            `json:"required_env"`
	RequiredService string              `json:"required_service,omitempty"`
	ManualFacts     []string            `json:"manual_facts"`
	Origin          artifact.Origin     `json:"origin"`
	ProofLevel      artifact.ProofLevel `json:"proof_level"`
	SourceRef       artifact.SourceRef  `json:"source_ref,omitempty"`
}

type ValidationOptions

type ValidationOptions struct {
	ProjectRoot          string
	RequireArtifacts     bool
	RequireProviderProof bool
}

type ValidationResult

type ValidationResult struct {
	Valid       bool                  `json:"valid"`
	Diagnostics []artifact.Diagnostic `json:"diagnostics"`
}

func Validate

func Validate(c *Contract, opts ValidationOptions) ValidationResult

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL