Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 v0.1.0 Jul 13, 2026 Changes in this version + var ErrConfirmationInvalid = errors.New("release confirmation is invalid") + var ErrDefaultsFormat = errors.New("defaults format is invalid") + var ErrEntityExists = errors.New("entity already exists") + var ErrEntityIDImmutable = errors.New("entity ID is immutable") + var ErrEntityIDInvalid = errors.New("entity ID is invalid") + var ErrEntityNotFound = errors.New("entity not found") + var ErrEntityTypeInvalid = errors.New("entity type is not declared by the Pack") + var ErrIdempotencyRequired = errors.New("idempotency key is required") + var ErrLastEnvironment = errors.New("cannot delete the last environment") + var ErrPackRegistryUnavailable = errors.New("pack registry is unavailable") + var ErrProviderProjectIDMissing = errors.New("先在环境管理中填写 Firebase 项目 ID") + var ErrReleaseNotFound = errors.New("release not found") + var ErrRemoteSnapshotUnavailable = errors.New("remote snapshot unavailable") + var ErrRollbackPreviewInvalid = errors.New("rollback preview is invalid") + func Initialize(workspace string, manifest project.Manifest) (string, error) + type EntityMutation struct + Action string + Entity *EntityRecord + EntityID string + EntityType string + ExpectedRevision uint64 + ExpectedSourceRevision string + Scope string + type EntityPresence struct + Present bool + Value *EntityRecord + func (p EntityPresence) MarshalJSON() ([]byte, error) + type EntityRecord = entities.Record + type EntityReference struct + EntityID string + EntityRef string + EntityType string + Path string + type EntityReferencedError struct + References []EntityReference + Revision uint64 + func (e *EntityReferencedError) Error() string + type EntityReferences struct + EntityRef string + ReferencedBy []EntityReference + type EntityView struct + Draft EntityPresence + Effective EntityPresence + EntityID string + EntityRef string + EntityType string + Origin string + Resolved EntityPresence + Source EntityPresence + SourceRevision string + type GitPrepareInput struct + EnvironmentID string + PlanID string + Slug string + type PlanInvalidatedError struct + PlanID string + Reason string + func (e *PlanInvalidatedError) Error() string + type ProviderInfo struct + Capabilities provider.Capabilities + CredentialsPathDisplay string + EnvironmentID string + ProviderType string + Status string + type ReleaseConfirmation struct + Acknowledged bool + AcknowledgedRiskItemIDs []string + EnvironmentID string + type ReleaseRequest struct + Confirmation ReleaseConfirmation + ExpectedDraftRevision uint64 + ExpectedRemoteETag string + PlanID string + type RemoteETagMismatchError struct + Current remote.Snapshot + EnvironmentID string + Expected string + PlanID string + func (e *RemoteETagMismatchError) Error() string + type RemoteProjection struct + EnvironmentID string + ObservedAt string + Projections []RemoteValueProjection + SnapshotETag string + type RemoteValueProjection struct + Availability string + EntityRef string + FieldPath string + ObservedAt string + ParameterKey string + ProjectionID string + ReasonCode string + Redacted bool + SnapshotETag string + ValueSummary string + type RollbackRequest struct + Confirmation ReleaseConfirmation + ExpectedRemoteETag string + RollbackPreviewID string + type Service struct + func Open(workspace string) (*Service, error) + func OpenWithPacks(workspace string, registry *packs.Registry) (*Service, error) + func OpenWithPacksAndProviderFactory(workspace string, registry *packs.Registry, ...) (*Service, error) + func (s *Service) CheckPlanForPublish(ctx context.Context, id string) (plan.Plan, error) + func (s *Service) CreateEnvironment(_ context.Context, expectedRevision uint64, environment project.Environment) (project.Snapshot, project.Environment, error) + func (s *Service) CreateRollbackPreview(ctx context.Context, environmentID, releaseID string) (operation.Operation, error) + func (s *Service) Defaults(_ context.Context, environmentID, format string) ([]byte, string, string, error) + func (s *Service) DeleteEnvironment(_ context.Context, expectedRevision uint64, environmentID string) (project.Snapshot, error) + func (s *Service) Diagnostics(ctx context.Context, environmentID string) (validation.Result, uint64, error) + func (s *Service) GetDraft(_ context.Context, environmentID string) (draft.View, uint64, error) + func (s *Service) GetEntity(_ context.Context, environmentID, entityType, entityID string) (EntityView, uint64, error) + func (s *Service) GetEntityReferences(_ context.Context, environmentID, entityType, entityID string) (EntityReferences, uint64, error) + func (s *Service) GetEnvironment(ctx context.Context, environmentID string) (project.Snapshot, project.Environment, error) + func (s *Service) GetPack(_ context.Context, name, version string) (packs.Definition, uint64, error) + func (s *Service) GetPackSchema(_ context.Context, name, version string, requestedVersion *uint64) (packs.Schema, uint64, error) + func (s *Service) GetPlan(ctx context.Context, id string) (plan.Plan, error) + func (s *Service) GitCommit(ctx context.Context, files []string, message, idempotencyKey string) (gitreview.CommitResult, error) + func (s *Service) GitCreateBranch(ctx context.Context, branch, idempotencyKey string) (gitreview.BranchResult, error) + func (s *Service) GitPrepare(ctx context.Context, input GitPrepareInput) (gitreview.PrepareResult, error) + func (s *Service) GitStatus(ctx context.Context) (gitreview.Status, error) + func (s *Service) ImportSource(ctx context.Context, environmentID string, expectedRevision uint64, ...) (draft.View, uint64, error) + func (s *Service) InspectSource(_ context.Context) (SourceInspectResult, error) + func (s *Service) ListEntities(_ context.Context, environmentID, entityType string) ([]EntityView, uint64, error) + func (s *Service) ListPacks(_ context.Context) packs.Snapshot + func (s *Service) MutateDraft(_ context.Context, environmentID string, mutation draft.Mutation) (draft.View, uint64, error) + func (s *Service) MutateEntity(_ context.Context, environmentID string, mutation EntityMutation) (EntityView, uint64, error) + func (s *Service) Operation(_ context.Context, id string) (operation.Operation, error) + func (s *Service) PlanArtifact(ctx context.Context, planID, name string) ([]byte, plan.ArtifactMetadata, plan.Plan, error) + func (s *Service) PreviewSourceSave(ctx context.Context, environmentID string) (source.Preview, error) + func (s *Service) ProviderStatus(ctx context.Context, environmentID string) (ProviderInfo, error) + func (s *Service) Release(ctx context.Context, id string) (release.Release, bool) + func (s *Service) ReleaseWithError(_ context.Context, id string) (release.Release, bool, error) + func (s *Service) Releases(ctx context.Context, environmentID string) []release.Release + func (s *Service) ReleasesPage(_ context.Context, environmentID string, limit int, cursor string) ([]release.Release, error) + func (s *Service) RemoteProjection(ctx context.Context, environmentID string) (RemoteProjection, error) + func (s *Service) RollbackPreview(_ context.Context, environmentID, releaseID string) (release.RollbackPreview, error) + func (s *Service) SaveDraft(_ context.Context, environmentID string, expectedRevision uint64, ...) (draft.View, uint64, error) + func (s *Service) Snapshot(_ context.Context) (project.Snapshot, error) + func (s *Service) SourceInfo(_ context.Context) (SourceInfo, error) + func (s *Service) StartPlan(ctx context.Context, environmentID string) (operation.Operation, error) + func (s *Service) StartProviderConnect(ctx context.Context, environmentID, credentialsPath string) (operation.Operation, error) + func (s *Service) StartPull(ctx context.Context, environmentID string) (operation.Operation, error) + func (s *Service) StartRelease(ctx context.Context, environmentID, idempotencyKey string, ...) (operation.Operation, error) + func (s *Service) StartRemoteValidate(ctx context.Context, environmentID, planID string) (operation.Operation, error) + func (s *Service) StartRollback(ctx context.Context, environmentID, releaseID, idempotencyKey string, ...) (operation.Operation, error) + func (s *Service) UpdateEnvironment(_ context.Context, expectedRevision uint64, environmentID string, ...) (project.Snapshot, project.Environment, error) + func (s *Service) UpdateProject(_ context.Context, expectedRevision uint64, metadata project.Project) (project.Snapshot, error) + func (s *Service) ValidateDraft(_ context.Context, environmentID string) (validation.Result, uint64, error) + type SourceInfo struct + Capabilities source.Capabilities + Status source.Status + Type string + type SourceInspectResult struct + Diagnostics []source.MappingDiagnostic + Matched bool + ProfilePath string + Workspace source.GitWorkspace