postgres

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalystScopedColumns

func AnalystScopedColumns(allowlist []string) bool

func ApplyScopedReaderGrants

func ApplyScopedReaderGrants(ctx context.Context, databaseURL string, params ScopedReaderGrantSQLParams) (string, error)

func BuildScopedReaderGrantSQL

func BuildScopedReaderGrantSQL(params ScopedReaderGrantSQLParams) (string, error)

func BusinessPilotScopedColumns

func BusinessPilotScopedColumns(allowlist []string) bool

func DefaultReadOnlyFunctionSignatures

func DefaultReadOnlyFunctionSignatures() []string

func FunctionSignaturesForTools

func FunctionSignaturesForTools(allowlist []string) []string

func GovernanceFunctionSignatures

func GovernanceFunctionSignatures() []string

func RedactedAllReadonlyScopedColumns added in v0.4.0

func RedactedAllReadonlyScopedColumns(allowlist []string) bool

func ServingSchemaAuditTables added in v0.4.0

func ServingSchemaAuditTables() []string

ServingSchemaAuditTables enumerates every table referenced by ServingSchemaAudit; useful for quick set-membership tests.

func URLFromEnv

func URLFromEnv(getenv func(string) string) string

func ValidateServingSchemaAudit added in v0.4.0

func ValidateServingSchemaAudit(snapshot ServingSchemaSnapshot, skippedTables []string) error

ValidateServingSchemaAudit fails when a column or table observed in the supplied snapshot is not categorized in ServingSchemaAudit. Foundation D-1 requires that newly introduced text/JSON/ID columns force an explicit allow/redact decision before they can be copied to the serving DB.

Tables in skippedTables (operator-only or governance bookkeeping) are allowed to exist on the source without an audit row because they are intentionally not copied; the snapshot simply confirms they are not referenced from the audit either.

Types

type CacheDiagnostics

type CacheDiagnostics struct {
	Backend                string `json:"backend"`
	SchemaVersion          int    `json:"schema_version"`
	SupportedSchemaVersion int    `json:"supported_schema_version"`
	ReadModelReady         bool   `json:"read_model_ready"`
	ReadModelStatus        string `json:"read_model_status"`
	ReadModelStaleReason   string `json:"read_model_stale_reason,omitempty"`
	ProfileCacheStatus     string `json:"profile_cache_status"`
	ReaderPrivilegeStatus  string `json:"reader_privilege_status"`
}

type ColumnSelectGrant

type ColumnSelectGrant struct {
	Table  string
	Column string
}

func BusinessPilotColumnSelectGrants

func BusinessPilotColumnSelectGrants() []ColumnSelectGrant

func DefaultReadOnlyColumnSelectGrants

func DefaultReadOnlyColumnSelectGrants() []ColumnSelectGrant

func RedactedAllReadonlyColumnSelectGrants added in v0.4.0

func RedactedAllReadonlyColumnSelectGrants() []ColumnSelectGrant

func ScopedReaderColumnSelectGrants

func ScopedReaderColumnSelectGrants() []ColumnSelectGrant

func ScopedReaderColumnSelectGrantsForAllowlist added in v0.4.0

func ScopedReaderColumnSelectGrantsForAllowlist(allowlist []string) []ColumnSelectGrant

type GovernancePolicyState

type GovernancePolicyState struct {
	ConfigSHA256        string   `json:"config_sha256"`
	DataFingerprint     string   `json:"data_fingerprint"`
	ConfigEntries       int      `json:"config_entries"`
	ConfigAliases       int      `json:"config_aliases"`
	MatchedEntries      int      `json:"matched_entries"`
	UnmatchedEntries    int      `json:"unmatched_entries"`
	SuppressedCallCount int      `json:"suppressed_call_count"`
	SuppressedCallIDs   []string `json:"suppressed_call_ids,omitempty"`
	UpdatedAt           string   `json:"updated_at"`
}

type ReadModelStatus

type ReadModelStatus struct {
	ModelName              string `json:"model_name"`
	ModelVersion           int    `json:"model_version"`
	CurrentVersion         int    `json:"current_version"`
	Ready                  bool   `json:"ready"`
	RebuiltAt              string `json:"rebuilt_at"`
	CallCount              int64  `json:"call_count"`
	FactCount              int64  `json:"fact_count"`
	MissingFactCallCount   int64  `json:"missing_fact_call_count"`
	OrphanFactCount        int64  `json:"orphan_fact_count"`
	StaleReason            string `json:"stale_reason,omitempty"`
	DiagnosticsCallCount   int64  `json:"diagnostics_call_count"`
	LimitExceededCallCount int64  `json:"limit_exceeded_call_count"`
	UpdatedAt              string `json:"updated_at"`
}

type ReadOnlyOptions

type ReadOnlyOptions struct {
	RequiredFunctionSignatures     []string
	AllowedFunctionSignatures      []string
	EnforceAllowedFunctionBoundary bool
	RequiredColumnSelectGrants     []ColumnSelectGrant
	AllowedColumnSelectGrants      []ColumnSelectGrant
	EnforceAllowedColumnBoundary   bool
	AllowAccountQuery              bool
	AllowBusinessAnalysisRawIDs    bool
}

func ReadOnlyOptionsForToolAllowlist

func ReadOnlyOptionsForToolAllowlist(allowlist []string) ReadOnlyOptions

type RefreshServingDBOptions added in v0.4.0

type RefreshServingDBOptions struct {
	SourceURL              string
	TargetURL              string
	Config                 *governance.Config
	NoGovernanceExclusions bool
}

RefreshServingDBOptions describes a Phase 13e4 redacted MCP serving database refresh. Source is the operator cache; target is the physically redacted MCP serving cache. Config carries the private governance YAML used to determine which call IDs must not appear on the target.

type ScopedReaderGrantSQLParams

type ScopedReaderGrantSQLParams struct {
	Allowlist    []string
	RoleName     string
	DatabaseName string
	Generator    string
}

type ServingColumnDecision added in v0.4.0

type ServingColumnDecision string

ServingColumnDecision categorizes a column copied from the operator cache into the redacted MCP serving database. Foundation D-1 requires that every column carrying customer identity or text/JSON has an explicit policy.

const (
	// ServingColumnAllowed means the column copies its source value verbatim
	// because the column does not carry customer identity (e.g. counts, dates,
	// integration IDs, profile aliases that have already been redacted).
	ServingColumnAllowed ServingColumnDecision = "allowed"

	// ServingColumnRedacted means the column copies a redacted/derived value;
	// the source value never reaches the serving DB unchanged. (Reserved for
	// future slices that introduce sanitization-during-copy.)
	ServingColumnRedacted ServingColumnDecision = "redacted"

	// ServingColumnNotCopied means the column exists in the source schema but
	// is intentionally absent from the serving DB; it must not be copied by
	// any future code path without an audit decision.
	ServingColumnNotCopied ServingColumnDecision = "not_copied"
)

type ServingColumnPolicy added in v0.4.0

type ServingColumnPolicy struct {
	Table      string
	Column     string
	Decision   ServingColumnDecision
	Reason     string
	CarriesPII bool
}

ServingColumnPolicy is one row of the schema/redaction audit. Each row names the table+column and the audit decision plus a one-line justification that explains why the decision is safe.

func ServingSchemaAudit added in v0.4.0

func ServingSchemaAudit() []ServingColumnPolicy

ServingSchemaAudit catalogs the operator-cache schema columns that the serving-DB refresh slice currently knows about. Foundation D-1 requires every column carrying customer identity, text, or JSON to be categorized; the linter test ValidateServingSchemaAudit rejects synthetic columns or tables that lack a decision.

This is the source of truth for the audit, so adding a new copy in serving.go must be paired with a new entry here.

type ServingDBRefreshMarker added in v0.5.0

type ServingDBRefreshMarker struct {
	ID                    int64           `json:"id"`
	RefreshedAt           string          `json:"refreshed_at"`
	SourceDataFingerprint string          `json:"source_data_fingerprint"`
	TargetDataFingerprint string          `json:"target_data_fingerprint"`
	PolicyConfigSHA256    string          `json:"policy_config_sha256"`
	SourceCalls           int64           `json:"source_calls"`
	TargetCalls           int64           `json:"target_calls"`
	RemovedCalls          int64           `json:"removed_calls"`
	SuppressedCallCount   int64           `json:"suppressed_call_count"`
	RowCountsJSON         json.RawMessage `json:"row_counts_json"`
}

ServingDBRefreshMarker is the persisted, sanitized proof that a target Postgres database was rebuilt through governance refresh. It intentionally contains fingerprints and counts only: no URLs, customer names, call IDs, call titles, governance terms, or transcript text.

type ServingDBRefreshResult added in v0.4.0

type ServingDBRefreshResult struct {
	ServingRefreshID         int64    `json:"serving_refresh_id,omitempty"`
	RefreshedAt              string   `json:"refreshed_at,omitempty"`
	Backend                  string   `json:"backend"`
	SourceCalls              int64    `json:"source_calls"`
	SourceUsers              int64    `json:"source_users"`
	SourceTranscripts        int64    `json:"source_transcripts"`
	SourceTranscriptSegments int64    `json:"source_transcript_segments"`
	SourceContextObjects     int64    `json:"source_context_objects"`
	SourceContextFields      int64    `json:"source_context_fields"`
	SourceGongSettings       int64    `json:"source_gong_settings"`
	SourceScorecards         int64    `json:"source_scorecards"`
	SourceScorecardActivity  int64    `json:"source_scorecard_activity"`
	SourceAIHighlights       int64    `json:"source_ai_highlights"`
	TargetCalls              int64    `json:"target_calls"`
	TargetUsers              int64    `json:"target_users"`
	TargetTranscripts        int64    `json:"target_transcripts"`
	TargetTranscriptSegments int64    `json:"target_transcript_segments"`
	TargetContextObjects     int64    `json:"target_context_objects"`
	TargetContextFields      int64    `json:"target_context_fields"`
	TargetGongSettings       int64    `json:"target_gong_settings"`
	TargetScorecards         int64    `json:"target_scorecards"`
	TargetScorecardActivity  int64    `json:"target_scorecard_activity"`
	TargetAIHighlights       int64    `json:"target_ai_highlights"`
	RemovedCalls             int64    `json:"removed_calls"`
	RemovedScorecardActivity int64    `json:"removed_scorecard_activity"`
	RemovedAIHighlights      int64    `json:"removed_ai_highlights"`
	SuppressedCallCount      int      `json:"suppressed_call_count"`
	NoGovernanceExclusions   bool     `json:"no_governance_exclusions,omitempty"`
	PolicyConfigSHA256       string   `json:"policy_config_sha256"`
	SourceDataFingerprint    string   `json:"source_data_fingerprint"`
	TargetDataFingerprint    string   `json:"target_data_fingerprint"`
	TargetSuppressedRows     int64    `json:"target_suppressed_rows"`
	SkippedTables            []string `json:"skipped_tables,omitempty"`
}

ServingDBRefreshResult is the sanitized output of a serving-DB refresh.

It intentionally does NOT include database URLs, customer names/aliases, blocklist values, call IDs, or call titles so the structure can be logged and shared with reviewers without leaking governance content or operator secrets.

func RefreshServingDB added in v0.4.0

func RefreshServingDB(ctx context.Context, opts RefreshServingDBOptions) (*ServingDBRefreshResult, error)

RefreshServingDB rebuilds the redacted MCP serving database (target) from the operator cache (source) using the supplied governance config.

Behavior summary:

  • Validates that source/target URLs are present and refer to different databases (different scheme/host/port/path tuple).
  • Determines the suppressed call ID set by running the existing governance audit logic against the source.
  • Truncates the call-scoped tables on the target that this slice rebuilds and copies allowed rows (call_id NOT IN suppressed) from source to target with raw payloads preserved.
  • Re-runs the Postgres read model rebuild and re-applies the governance policy on the target so MCP can serve sanitized outputs immediately.

The serving refresh intentionally does not copy several operator/global metadata tables; see servingSkippedTables for the full list. Skipped tables are surfaced in the sanitized output so reviewers can confirm the boundary.

type ServingSchemaSnapshot added in v0.4.0

type ServingSchemaSnapshot struct {
	Tables map[string][]string
}

ServingSchemaSnapshot describes the columns observed in some live source schema. Tests use it to feed a synthetic snapshot into the validator.

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, databaseURL string) (*Store, error)

func OpenProfileInventory

func OpenProfileInventory(ctx context.Context, databaseURL string) (*Store, error)

func OpenReadOnly

func OpenReadOnly(ctx context.Context, databaseURL string) (*Store, error)

func OpenReadOnlyWithOptions

func OpenReadOnlyWithOptions(ctx context.Context, databaseURL string, options ReadOnlyOptions) (*Store, error)

func OpenStatus

func OpenStatus(ctx context.Context, databaseURL string) (*Store, error)

func (*Store) ActivateProfile

func (s *Store) ActivateProfile(ctx context.Context, ref string) (*sqlite.ProfileImportResult, error)

func (*Store) ActiveBusinessProfile

func (s *Store) ActiveBusinessProfile(ctx context.Context) (*sqlite.BusinessProfile, error)

func (*Store) ActiveProfileDocument

func (s *Store) ActiveProfileDocument(ctx context.Context) (*profilepkg.Profile, error)

func (*Store) AnalyzeLateStageSignals

func (s *Store) AnalyzeLateStageSignals(ctx context.Context, params sqlite.LateStageSignalParams) (*sqlite.LateStageSignalsReport, error)

func (*Store) BuildAndSaveGovernancePolicy

func (s *Store) BuildAndSaveGovernancePolicy(ctx context.Context, configSHA256 string, cfg *governance.Config) (*governance.Audit, *GovernancePolicyState, error)

func (*Store) CacheDiagnostics

func (s *Store) CacheDiagnostics(ctx context.Context) (*CacheDiagnostics, error)

func (*Store) CacheInventory

func (s *Store) CacheInventory(ctx context.Context) (*sqlite.CacheInventory, error)

func (*Store) CallDrilldownEvidence added in v0.4.0

func (s *Store) CallDrilldownEvidence(ctx context.Context, params sqlite.CallDrilldownEvidenceParams) ([]sqlite.CallDrilldownEvidenceRow, error)

CallDrilldownEvidence returns bounded transcript excerpts scoped to a single call. The Postgres path uses a dedicated SECURITY DEFINER function so scoped MCP roles can drill into one call without being granted broad transcript_segments search rights.

func (*Store) CallFactsCoverage

func (s *Store) CallFactsCoverage(ctx context.Context) (*sqlite.CallFactsCoverage, error)

func (*Store) CallFactsCoverageWithSource

func (s *Store) CallFactsCoverageWithSource(ctx context.Context, sourceArg string) (*sqlite.CallFactsCoverage, []sqlite.CallFactsSummaryRow, *sqlite.ProfileQueryInfo, error)

func (*Store) CallRawJSON added in v0.4.0

func (s *Store) CallRawJSON(ctx context.Context, callID string) (json.RawMessage, error)

func (*Store) ClearGovernanceIngestSkippedCall added in v0.4.0

func (s *Store) ClearGovernanceIngestSkippedCall(ctx context.Context, callID string) error

func (*Store) Close

func (s *Store) Close() error

func (*Store) DB

func (s *Store) DB() *sql.DB

func (*Store) DeleteGovernanceIngestCachedCall added in v0.4.0

func (s *Store) DeleteGovernanceIngestCachedCall(ctx context.Context, callID string) error

func (*Store) FindCallsMissingTranscripts

func (s *Store) FindCallsMissingTranscripts(ctx context.Context, limit int) ([]sqlite.MissingTranscriptCall, error)

func (*Store) FindCallsMissingTranscriptsByFilters

func (s *Store) FindCallsMissingTranscriptsByFilters(ctx context.Context, params sqlite.MissingTranscriptSearchParams) ([]sqlite.MissingTranscriptCall, error)

func (*Store) FinishSyncRun

func (s *Store) FinishSyncRun(ctx context.Context, runID int64, params sqlite.FinishSyncRunParams) error

func (*Store) GetCallDetail

func (s *Store) GetCallDetail(ctx context.Context, callID string) (*sqlite.CallDetail, error)

func (*Store) GetScorecardDetail

func (s *Store) GetScorecardDetail(ctx context.Context, scorecardID string) (*sqlite.ScorecardDetail, error)

func (*Store) GovernanceDataFingerprint

func (s *Store) GovernanceDataFingerprint(ctx context.Context) (string, error)

func (*Store) GovernanceNameCandidates

func (s *Store) GovernanceNameCandidates(ctx context.Context) ([]governance.Candidate, error)

func (*Store) ImportProfile

func (s *Store) ImportProfile(ctx context.Context, params sqlite.ProfileImportParams) (*sqlite.ProfileImportResult, error)

func (*Store) LatestServingRefreshMarker added in v0.5.0

func (s *Store) LatestServingRefreshMarker(ctx context.Context) (*ServingDBRefreshMarker, error)

LatestServingRefreshMarker returns the most recent successful serving refresh marker for diagnostics. sql.ErrNoRows means the database has no durable proof that it was built by governance refresh.

func (*Store) ListAIHighlights added in v0.4.0

func (s *Store) ListAIHighlights(ctx context.Context, params sqlite.AIHighlightListParams) ([]sqlite.AIHighlightRow, error)

ListAIHighlights returns bounded, typed Gong AI highlight rows from the Postgres call_ai_highlights read model. The serving DB never contains rows for governance-restricted calls, so they remain absent without any additional filtering here. Raw highlight JSON is intentionally not exposed; only the typed text/type/index columns are returned.

func (*Store) ListBusinessConcepts

func (s *Store) ListBusinessConcepts(ctx context.Context) ([]sqlite.BusinessConcept, error)

func (*Store) ListCRMFields

func (s *Store) ListCRMFields(ctx context.Context, objectType string, limit int) ([]sqlite.CRMFieldSummary, error)

func (*Store) ListCRMIntegrations

func (s *Store) ListCRMIntegrations(ctx context.Context) ([]sqlite.CRMIntegrationRecord, error)

func (*Store) ListCRMObjectTypes

func (s *Store) ListCRMObjectTypes(ctx context.Context) ([]sqlite.CRMObjectTypeSummary, error)

func (*Store) ListCRMSchemaFields

func (s *Store) ListCRMSchemaFields(ctx context.Context, params sqlite.CRMSchemaFieldListParams) ([]sqlite.CRMSchemaFieldRecord, error)

func (*Store) ListCRMSchemaObjects

func (s *Store) ListCRMSchemaObjects(ctx context.Context, integrationID string) ([]sqlite.CRMSchemaObjectRecord, error)

func (*Store) ListGongSettings

func (s *Store) ListGongSettings(ctx context.Context, params sqlite.GongSettingListParams) ([]sqlite.GongSettingRecord, error)

func (*Store) ListLifecycleBucketDefinitions

func (s *Store) ListLifecycleBucketDefinitions(ctx context.Context) ([]sqlite.LifecycleBucketDefinition, error)

func (*Store) ListLifecycleBucketDefinitionsWithSource

func (s *Store) ListLifecycleBucketDefinitionsWithSource(ctx context.Context, requested string) ([]sqlite.LifecycleBucketDefinition, *sqlite.ProfileQueryInfo, error)

func (*Store) ListProfiles

func (s *Store) ListProfiles(ctx context.Context) ([]sqlite.ProfileHistoryEntry, error)

func (*Store) ListScorecards

func (s *Store) ListScorecards(ctx context.Context, params sqlite.ScorecardListParams) ([]sqlite.ScorecardSummary, error)

func (*Store) ListUnmappedCRMFields

func (s *Store) ListUnmappedCRMFields(ctx context.Context, params sqlite.UnmappedCRMFieldParams) ([]sqlite.UnmappedCRMField, error)

func (*Store) LoadGovernancePolicy

func (s *Store) LoadGovernancePolicy(ctx context.Context, configSHA256 string) (*GovernancePolicyState, error)

func (*Store) Migrate

func (s *Store) Migrate(ctx context.Context) error

func (*Store) PlanCachePurgeBefore

func (s *Store) PlanCachePurgeBefore(ctx context.Context, startedBefore string) (*sqlite.CachePurgePlan, error)

func (*Store) ProfileDocument

func (s *Store) ProfileDocument(ctx context.Context, ref string) (*sqlite.StoredProfileDocument, error)

func (*Store) ProfileInventory

func (s *Store) ProfileInventory(ctx context.Context) (*profilepkg.Inventory, error)

func (*Store) PurgeCacheBefore

func (s *Store) PurgeCacheBefore(ctx context.Context, startedBefore string) (*sqlite.CachePurgePlan, error)

func (*Store) ReadModelStatus

func (s *Store) ReadModelStatus(ctx context.Context) (*ReadModelStatus, error)

func (*Store) RebuildReadModel

func (s *Store) RebuildReadModel(ctx context.Context) (*ReadModelStatus, error)

func (*Store) RecordGovernanceIngestSkippedCall added in v0.4.0

func (s *Store) RecordGovernanceIngestSkippedCall(ctx context.Context, params sqlite.GovernanceIngestSkippedCallParams) error

func (*Store) RecordGovernanceIngestSkippedCallAndDeleteCachedCall added in v0.4.0

func (s *Store) RecordGovernanceIngestSkippedCallAndDeleteCachedCall(ctx context.Context, params sqlite.GovernanceIngestSkippedCallParams) error

func (*Store) RecordServingRefreshMarker added in v0.5.0

func (s *Store) RecordServingRefreshMarker(ctx context.Context, result *ServingDBRefreshResult) (*ServingDBRefreshMarker, error)

RecordServingRefreshMarker stores a sanitized proof record for a successful serving refresh. Call it only after copy, read-model rebuild, governance policy application, and validation have succeeded.

func (*Store) RefreshActiveProfileReadModel

func (s *Store) RefreshActiveProfileReadModel(ctx context.Context) error

func (*Store) ResolveCallIDByRef added in v0.4.0

func (s *Store) ResolveCallIDByRef(ctx context.Context, ref string) (string, error)

func (*Store) ResolveLifecycleSource

func (s *Store) ResolveLifecycleSource(ctx context.Context, requested string) (string, *sqlite.BusinessProfile, error)

func (*Store) ScorecardActivityOverview

func (s *Store) ScorecardActivityOverview(ctx context.Context, limit int) (*sqlite.ScorecardActivityOverview, error)

func (*Store) SearchCRMFieldValues

func (s *Store) SearchCRMFieldValues(ctx context.Context, params sqlite.CRMFieldValueSearchParams) ([]sqlite.CRMFieldValueMatch, error)

func (*Store) SearchCallsByLifecycle

func (s *Store) SearchCallsByLifecycle(ctx context.Context, params sqlite.LifecycleCallSearchParams) ([]sqlite.LifecycleCallSearchResult, error)

func (*Store) SearchCallsRaw

func (s *Store) SearchCallsRaw(ctx context.Context, params sqlite.CallSearchParams) ([]json.RawMessage, error)

func (*Store) SearchTranscriptSegments

func (s *Store) SearchTranscriptSegments(ctx context.Context, query string, limit int) ([]sqlite.TranscriptSearchResult, error)

func (*Store) SearchTranscriptSegmentsByCRMContext

func (s *Store) SearchTranscriptSegmentsByCRMContext(ctx context.Context, params sqlite.TranscriptCRMSearchParams) ([]sqlite.TranscriptCRMSearchResult, error)

func (*Store) StartSyncRun

func (s *Store) StartSyncRun(ctx context.Context, params sqlite.StartSyncRunParams) (*sqlite.SyncRun, error)

func (*Store) SummarizeCallFacts

func (s *Store) SummarizeCallFacts(ctx context.Context, params sqlite.CallFactsSummaryParams) ([]sqlite.CallFactsSummaryRow, error)

func (*Store) SummarizeCallFactsWithSource

func (s *Store) SummarizeCallFactsWithSource(ctx context.Context, params sqlite.CallFactsSummaryParams) ([]sqlite.CallFactsSummaryRow, *sqlite.ProfileQueryInfo, error)

func (*Store) SummarizeCallsByLifecycle

func (s *Store) SummarizeCallsByLifecycle(ctx context.Context, params sqlite.LifecycleSummaryParams) ([]sqlite.LifecycleBucketSummary, error)

func (*Store) SummarizeCallsByLifecycleWithSource

func (s *Store) SummarizeCallsByLifecycleWithSource(ctx context.Context, params sqlite.LifecycleSummaryParams) ([]sqlite.LifecycleBucketSummary, *sqlite.ProfileQueryInfo, error)

func (*Store) SummarizeOpportunityCalls

func (s *Store) SummarizeOpportunityCalls(ctx context.Context, params sqlite.OpportunityCallSummaryParams) ([]sqlite.OpportunityCallSummary, error)

func (*Store) SyncStatusSummary

func (s *Store) SyncStatusSummary(ctx context.Context) (*sqlite.SyncStatusSummary, error)

func (*Store) UpsertCRMIntegration

func (s *Store) UpsertCRMIntegration(ctx context.Context, raw json.RawMessage) (*sqlite.CRMIntegrationRecord, error)

func (*Store) UpsertCRMSchema

func (s *Store) UpsertCRMSchema(ctx context.Context, integrationID string, objectType string, raw json.RawMessage) (int64, error)

func (*Store) UpsertCall

func (s *Store) UpsertCall(ctx context.Context, raw json.RawMessage) (*sqlite.CallRecord, error)

func (*Store) UpsertGongSetting

func (s *Store) UpsertGongSetting(ctx context.Context, kind string, raw json.RawMessage) (*sqlite.GongSettingRecord, error)

func (*Store) UpsertScorecardActivity

func (s *Store) UpsertScorecardActivity(ctx context.Context, raw json.RawMessage) (*sqlite.ScorecardActivityRecord, error)

func (*Store) UpsertTranscript

func (s *Store) UpsertTranscript(ctx context.Context, raw json.RawMessage) (*sqlite.TranscriptRecord, error)

func (*Store) UpsertUser

func (s *Store) UpsertUser(ctx context.Context, raw json.RawMessage) (*sqlite.UserRecord, error)

Jump to

Keyboard shortcuts

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