{"modulePath":"github.com/Stackdome/stackdome","version":"v0.0.7-alpha","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stackresource\n\n## Types\n\n```go\ntype Validator interface {\n\tValidate(ctx context.Context, stack *models.Stack, resource *models.StackResource, siblings []*models.StackResource) ([]errors.FieldError, *errors.ServiceError)\n}\n```\nValidator runs every cheap (input-only, DB-only, sibling) validation for a single stack resource and returns all failures. It never touches the network. A non-nil ServiceError means a lookup failed for reasons other than not-found (e.g. a DB outage) and validation was aborted; the caller should turn it into a 500 rather than trusting the (nil) FieldError slice.\n\n```go\nfunc NewValidator(spec ValidatorSpec) Validator\n```\nNewValidator wires the shared per-resource validator. Every seam is required: this validator runs the full referential-integrity rule set unconditionally, so a missing seam would silently skip whatever rule it backs rather than fail loudly. Callers that genuinely don't need a namespace-scoped DB lookup for volumes (e.g. the whole-stack fat path, where bundled volumes aren't persisted yet) still pass a real store: see the payload-first check in validateMountedVolumes.\n\n```go\ntype ValidatorSpec struct {\n\tVolumes            volumeGetter\n\tSecrets            secretGetter\n\tDomains            domainLister\n\tCredentials        credentials.Resolver\n\tGitIntegrations    gitIntegrationGetter\n\tPlatformBaseDomain string\n}\n```\n\n","path":"github.com/Stackdome/stackdome/pkg/validator/stackresource","name":"stackresource","synopsis":"","isRedistributable":true}
