{"modulePath":"github.com/Stackdome/stackdome","version":"v0.0.7-alpha","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validator\n\n## Types\n\n```go\ntype ObjectStoreValidator interface {\n\tValidateForCreate(ctx context.Context, spec *models.ObjectStore) *errors.ServiceError\n\tValidateForUpdate(ctx context.Context, existing *models.ObjectStore, spec *models.ObjectStore) *errors.ServiceError\n}\n```\n\n```go\ntype PostgresAddonValidator interface {\n\tValidateForCreate(ctx context.Context, spec *models.PostgresAddon) *errors.ServiceError\n\tValidateForUpdate(ctx context.Context, existing *models.PostgresAddon, spec *models.PostgresAddon) *errors.ServiceError\n}\n```\n\n```go\ntype SecretValidator interface {\n\tValidateSecretData(secret *models.Secret) *errors.ServiceError\n\tValidateSecretType(secretType models.SecretType, secret *models.Secret) *errors.ServiceError\n}\n```\n\n```go\ntype StackValidator interface {\n\tValidateForCreate(ctx context.Context, spec *models.Stack) *errors.ServiceError\n\tValidateForUpdate(ctx context.Context, existing *models.Stack, spec *models.Stack) *errors.ServiceError\n\t// ValidateConnections runs only the connection-scoped rules against the\n\t// full stack context, skipping per-resource validation and its DB\n\t// referential lookups. Used for connection-only mutations so a\n\t// pre-existing, unrelated stack invalidity can't block a connection edit.\n\tValidateConnections(ctx context.Context, spec *models.Stack) *errors.ServiceError\n\t// ValidateShell runs only the rules scoped to the stack's own columns\n\t// (currently the settings limits), skipping resource, uniqueness, and\n\t// connection validation entirely. Used for thin shell mutations, which\n\t// never carry children.\n\tValidateShell(ctx context.Context, spec *models.Stack) *errors.ServiceError\n}\n```\n\n","path":"github.com/Stackdome/stackdome/pkg/validator","name":"validator","synopsis":"","isRedistributable":true}
