Documentation
¶
Index ¶
- type PostgresDB
- func (db *PostgresDB) BulkDeleteObjects(ctx context.Context, ids []string) error
- func (db *PostgresDB) BulkUpdateAccessMethods(ctx context.Context, updates map[string][]objects.AccessMethod) error
- func (db *PostgresDB) CreateBucketScope(ctx context.Context, scope *buckets.Scope) error
- func (db *PostgresDB) CreateObject(ctx context.Context, obj *objects.Record) error
- func (db *PostgresDB) CreateObjectAlias(ctx context.Context, aliasID, canonicalObjectID string) error
- func (db *PostgresDB) DeleteBucketScope(ctx context.Context, organization, projectID, credentialID, pathPrefix string) error
- func (db *PostgresDB) DeleteObject(ctx context.Context, id string) error
- func (db *PostgresDB) DeleteObjectAlias(ctx context.Context, aliasID string) error
- func (db *PostgresDB) DeleteS3Credential(ctx context.Context, credentialID string) error
- func (db *PostgresDB) GetBucketScope(ctx context.Context, organization, projectID string) (*buckets.Scope, error)
- func (db *PostgresDB) GetBulkObjects(ctx context.Context, ids []string) ([]objects.Record, error)
- func (db *PostgresDB) GetFileUsage(ctx context.Context, objectID string) (*usage.FileUsage, error)
- func (db *PostgresDB) GetFileUsageSummary(ctx context.Context, inactiveSince *time.Time) (usage.FileUsageSummary, error)
- func (db *PostgresDB) GetFileUsageSummaryByResources(ctx context.Context, resources []string, includeUnscoped bool, ...) (usage.FileUsageSummary, error)
- func (db *PostgresDB) GetFileUsageSummaryByScope(ctx context.Context, organization, project string, inactiveSince *time.Time) (usage.FileUsageSummary, error)
- func (db *PostgresDB) GetObject(ctx context.Context, id string) (*objects.Record, error)
- func (db *PostgresDB) GetObjectsByChecksum(ctx context.Context, checksum string) ([]objects.Record, error)
- func (db *PostgresDB) GetObjectsByChecksums(ctx context.Context, checksums []string) (map[string][]objects.Record, error)
- func (db *PostgresDB) GetPendingMetadata(ctx context.Context, oid string) (*transferlfs.PendingMetadata, error)
- func (db *PostgresDB) GetProjectRecordSummaryByScope(ctx context.Context, organization, project string) (usage.FileUsageSummary, error)
- func (db *PostgresDB) GetS3Credential(ctx context.Context, credentialID string) (*buckets.Credential, error)
- func (db *PostgresDB) GetTransferAttributionBreakdown(ctx context.Context, filter usage.Filter, groupBy string) ([]usage.Breakdown, error)
- func (db *PostgresDB) GetTransferAttributionBreakdownByResources(ctx context.Context, filter usage.Filter, groupBy string, resources []string) ([]usage.Breakdown, error)
- func (db *PostgresDB) GetTransferAttributionSummary(ctx context.Context, filter usage.Filter) (usage.Summary, error)
- func (db *PostgresDB) GetTransferAttributionSummaryByResources(ctx context.Context, filter usage.Filter, resources []string) (usage.Summary, error)
- func (db *PostgresDB) ListBucketScopes(ctx context.Context) ([]buckets.Scope, error)
- func (db *PostgresDB) ListBucketVisibilityRows(ctx context.Context, resources []string, ...) ([]buckets.VisibilityRow, error)
- func (db *PostgresDB) ListFileUsage(ctx context.Context, limit, offset int, inactiveSince *time.Time) ([]usage.FileUsage, error)
- func (db *PostgresDB) ListFileUsageByObjectIDs(ctx context.Context, ids []string) ([]usage.FileUsage, error)
- func (db *PostgresDB) ListFileUsagePageByResources(ctx context.Context, resources []string, includeUnscoped bool, ...) ([]usage.FileUsage, error)
- func (db *PostgresDB) ListFileUsagePageByScope(ctx context.Context, organization, project string, limit, offset int, ...) ([]usage.FileUsage, error)
- func (db *PostgresDB) ListObjectIDsByChecksumsAndResources(ctx context.Context, checksums []string, resources []string, ...) (map[string][]string, error)
- func (db *PostgresDB) ListObjectIDsByResources(ctx context.Context, resources []string, includeUnscoped bool) ([]string, error)
- func (db *PostgresDB) ListObjectIDsByScope(ctx context.Context, organization, project string) ([]string, error)
- func (db *PostgresDB) ListObjectIDsByScopeAndResources(ctx context.Context, organization, project string, resources []string, ...) ([]string, error)
- func (db *PostgresDB) ListObjectIDsPageByResources(ctx context.Context, resources []string, includeUnscoped bool, ...) ([]string, error)
- func (db *PostgresDB) ListObjectIDsPageByScope(ctx context.Context, organization, project, startAfter string, ...) ([]string, error)
- func (db *PostgresDB) ListObjectIDsPageByURL(ctx context.Context, objectURL, organization, project, startAfter string, ...) ([]string, error)
- func (db *PostgresDB) ListS3Credentials(ctx context.Context) ([]buckets.Credential, error)
- func (db *PostgresDB) ListScopedObjectIDsByChecksums(ctx context.Context, organization, project string, checksums []string) (map[string][]string, error)
- func (db *PostgresDB) PopPendingMetadata(ctx context.Context, oid string) (*transferlfs.PendingMetadata, error)
- func (db *PostgresDB) RecordFileDownload(ctx context.Context, objectID string) error
- func (db *PostgresDB) RecordFileUpload(ctx context.Context, objectID string) error
- func (db *PostgresDB) RecordProviderTransferEvents(ctx context.Context, events []usage.ProviderEvent) error
- func (db *PostgresDB) RecordTransferAttributionEvents(ctx context.Context, events []usage.Event) error
- func (db *PostgresDB) RegisterObjects(ctx context.Context, objects []objects.Record) error
- func (db *PostgresDB) RemoveObjectControlledAccess(ctx context.Context, objectID, resource string) error
- func (db *PostgresDB) RemoveObjectControlledAccessBulk(ctx context.Context, objectIDs []string, resource string) (int, error)
- func (db *PostgresDB) ReplaceObjects(ctx context.Context, objects []objects.Record) error
- func (db *PostgresDB) ResolveObjectAlias(ctx context.Context, aliasID string) (string, error)
- func (db *PostgresDB) SavePendingMetadata(ctx context.Context, entries []transferlfs.PendingMetadata) error
- func (db *PostgresDB) SaveS3Credential(ctx context.Context, cred *buckets.Credential) error
- func (db *PostgresDB) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []objects.AccessMethod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresDB ¶
type PostgresDB struct {
// contains filtered or unexported fields
}
func NewPostgresDB ¶
func NewPostgresDB(dsn string) (*PostgresDB, error)
func (*PostgresDB) BulkDeleteObjects ¶
func (db *PostgresDB) BulkDeleteObjects(ctx context.Context, ids []string) error
func (*PostgresDB) BulkUpdateAccessMethods ¶
func (db *PostgresDB) BulkUpdateAccessMethods(ctx context.Context, updates map[string][]objects.AccessMethod) error
func (*PostgresDB) CreateBucketScope ¶
func (*PostgresDB) CreateObject ¶
func (*PostgresDB) CreateObjectAlias ¶
func (db *PostgresDB) CreateObjectAlias(ctx context.Context, aliasID, canonicalObjectID string) error
func (*PostgresDB) DeleteBucketScope ¶
func (db *PostgresDB) DeleteBucketScope(ctx context.Context, organization, projectID, credentialID, pathPrefix string) error
func (*PostgresDB) DeleteObject ¶
func (db *PostgresDB) DeleteObject(ctx context.Context, id string) error
func (*PostgresDB) DeleteObjectAlias ¶
func (db *PostgresDB) DeleteObjectAlias(ctx context.Context, aliasID string) error
func (*PostgresDB) DeleteS3Credential ¶
func (db *PostgresDB) DeleteS3Credential(ctx context.Context, credentialID string) error
func (*PostgresDB) GetBucketScope ¶
func (*PostgresDB) GetBulkObjects ¶
func (*PostgresDB) GetFileUsage ¶
func (*PostgresDB) GetFileUsageSummary ¶
func (db *PostgresDB) GetFileUsageSummary(ctx context.Context, inactiveSince *time.Time) (usage.FileUsageSummary, error)
func (*PostgresDB) GetFileUsageSummaryByResources ¶
func (db *PostgresDB) GetFileUsageSummaryByResources(ctx context.Context, resources []string, includeUnscoped bool, inactiveSince *time.Time) (usage.FileUsageSummary, error)
func (*PostgresDB) GetFileUsageSummaryByScope ¶
func (db *PostgresDB) GetFileUsageSummaryByScope(ctx context.Context, organization, project string, inactiveSince *time.Time) (usage.FileUsageSummary, error)
func (*PostgresDB) GetObjectsByChecksum ¶
func (*PostgresDB) GetObjectsByChecksums ¶
func (*PostgresDB) GetPendingMetadata ¶
func (db *PostgresDB) GetPendingMetadata(ctx context.Context, oid string) (*transferlfs.PendingMetadata, error)
func (*PostgresDB) GetProjectRecordSummaryByScope ¶
func (db *PostgresDB) GetProjectRecordSummaryByScope(ctx context.Context, organization, project string) (usage.FileUsageSummary, error)
func (*PostgresDB) GetS3Credential ¶
func (db *PostgresDB) GetS3Credential(ctx context.Context, credentialID string) (*buckets.Credential, error)
func (*PostgresDB) GetTransferAttributionBreakdown ¶
func (*PostgresDB) GetTransferAttributionBreakdownByResources ¶
func (*PostgresDB) GetTransferAttributionSummary ¶
func (*PostgresDB) GetTransferAttributionSummaryByResources ¶
func (*PostgresDB) ListBucketScopes ¶
func (*PostgresDB) ListBucketVisibilityRows ¶
func (db *PostgresDB) ListBucketVisibilityRows(ctx context.Context, resources []string, includeUnscoped, restrictToResources bool) ([]buckets.VisibilityRow, error)
func (*PostgresDB) ListFileUsage ¶
func (*PostgresDB) ListFileUsageByObjectIDs ¶
func (*PostgresDB) ListFileUsagePageByResources ¶
func (*PostgresDB) ListFileUsagePageByScope ¶
func (*PostgresDB) ListObjectIDsByChecksumsAndResources ¶
func (*PostgresDB) ListObjectIDsByResources ¶
func (*PostgresDB) ListObjectIDsByScope ¶
func (*PostgresDB) ListObjectIDsByScopeAndResources ¶
func (*PostgresDB) ListObjectIDsPageByResources ¶
func (*PostgresDB) ListObjectIDsPageByScope ¶
func (*PostgresDB) ListObjectIDsPageByURL ¶
func (*PostgresDB) ListS3Credentials ¶
func (db *PostgresDB) ListS3Credentials(ctx context.Context) ([]buckets.Credential, error)
func (*PostgresDB) ListScopedObjectIDsByChecksums ¶
func (*PostgresDB) PopPendingMetadata ¶
func (db *PostgresDB) PopPendingMetadata(ctx context.Context, oid string) (*transferlfs.PendingMetadata, error)
func (*PostgresDB) RecordFileDownload ¶
func (db *PostgresDB) RecordFileDownload(ctx context.Context, objectID string) error
func (*PostgresDB) RecordFileUpload ¶
func (db *PostgresDB) RecordFileUpload(ctx context.Context, objectID string) error
func (*PostgresDB) RecordProviderTransferEvents ¶
func (db *PostgresDB) RecordProviderTransferEvents(ctx context.Context, events []usage.ProviderEvent) error
func (*PostgresDB) RecordTransferAttributionEvents ¶
func (*PostgresDB) RegisterObjects ¶
RegisterObjects is the content identity write boundary. A transaction advisory lock serializes both SHA lookup and UUID claims across processes.
func (*PostgresDB) RemoveObjectControlledAccess ¶
func (db *PostgresDB) RemoveObjectControlledAccess(ctx context.Context, objectID, resource string) error
func (*PostgresDB) RemoveObjectControlledAccessBulk ¶
func (*PostgresDB) ReplaceObjects ¶
ReplaceObjects is the checked, atomic boundary for whole-object updates. Registration remains additive; replacement is reserved for callers that have update authority over every current grant.
func (*PostgresDB) ResolveObjectAlias ¶
func (*PostgresDB) SavePendingMetadata ¶
func (db *PostgresDB) SavePendingMetadata(ctx context.Context, entries []transferlfs.PendingMetadata) error
func (*PostgresDB) SaveS3Credential ¶
func (db *PostgresDB) SaveS3Credential(ctx context.Context, cred *buckets.Credential) error
func (*PostgresDB) UpdateObjectAccessMethods ¶
func (db *PostgresDB) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []objects.AccessMethod) error
Click to show internal directories.
Click to hide internal directories.