{"modulePath":"github.com/Stackdome/stackdome","version":"v0.0.7-alpha","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stackdeploy\n\nPackage stackdeploy converts a draft stack (user-authored state from the DB) into an effective stack: connections, self outputs, and volume relationships resolved into the concrete values the cluster CR builder consumes.\n\n## Functions\n\n```go\nfunc CloneStack(stack *models.Stack) (*models.Stack, error)\n```\nCloneStack deep-copies a stack via JSON so the resolver never mutates the caller's draft.\n\n```go\nfunc PostgresConnectionConfig(connection models.StackConnection) (database string, superuser bool, err error)\n```\n\n```go\nfunc PostgresCredentialSecretName(addonID, database string) string\n```\nPostgresCredentialSecretName returns the deterministic K8s Secret name for projected postgres credentials in a stack's namespace. The format is pgcred-\\\u003c8-char-hash\u003e-\\\u003csanitized-database\u003e.\n\n```go\nfunc ResolveTemplate(tmplStr string, data map[string]string) (string, error)\n```\nResolveTemplate executes a Go text/template string against the provided data. Template keys are registered as zero-arg functions so {{ key }} syntax works without a dot prefix. Keys must be valid Go identifiers (letters, digits, underscores; cannot start with a digit).\n\n```go\nfunc ValidateTemplateKeys(tmplStr string, values map[string]models.OutputValueRef) error\n```\nValidateTemplateKeys checks that all keys in the values map are valid Go identifiers and that the template string parses successfully.\n\n## Types\n\n```go\ntype DependencyNotReadyError struct {\n\tMessage string\n}\n```\nDependencyNotReadyError signals that a backing resource is not available yet and resolution should be retried.\n\n```go\nfunc (e DependencyNotReadyError) Error() string\n```\n\n```go\ntype PostgresAddonService interface {\n\tInternalGetPostgresAddon(ctx context.Context, id string) (*models.PostgresAddon, *errors.ServiceError)\n\tInternalGetCredentials(ctx context.Context, addonID string, database string, superuser bool) (*models.PostgresCredentials, *errors.ServiceError)\n}\n```\n\n```go\ntype Resolver struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewResolver(spec ResolverSpec) *Resolver\n```\n\n```go\nfunc (r *Resolver) Resolve(ctx context.Context, stack *models.Stack) (*models.Stack, error)\n```\nResolve returns an effective copy of the stack with volume connections, self outputs, and env connections resolved. The input stack is not mutated.\n\n```go\ntype ResolverSpec struct {\n\tVolumeService        VolumeService\n\tPostgresAddonService PostgresAddonService\n\tSecretService        SecretService\n}\n```\n\n```go\ntype SecretService interface {\n\tInternalGetByID(ctx context.Context, id string) (*models.Secret, *errors.ServiceError)\n}\n```\n\n```go\ntype VolumeService interface {\n\tListVolumesUsedByStack(ctx context.Context, stackID string) ([]*models.Volume, *errors.ServiceError)\n}\n```\n\n","path":"github.com/Stackdome/stackdome/pkg/stackdeploy","name":"stackdeploy","synopsis":"Package stackdeploy converts a draft stack (user-authored state from the DB) into an effective stack: connections, self outputs, and volume relationships resolved into the concrete values the cluster CR builder consumes.","isRedistributable":true}
