Documentation
¶
Index ¶
- type PostgresDB
- func (db *PostgresDB) BulkDeleteObjects(ctx context.Context, ids []string) error
- func (db *PostgresDB) BulkUpdateAccessMethods(ctx context.Context, updates map[string][]drs.AccessMethod) error
- func (db *PostgresDB) CreateBucketScope(ctx context.Context, scope *models.BucketScope) error
- func (db *PostgresDB) CreateObject(ctx context.Context, obj *models.InternalObject) error
- func (db *PostgresDB) CreateObjectAlias(ctx context.Context, aliasID, canonicalObjectID 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, bucket string) error
- func (db *PostgresDB) GetBucketScope(ctx context.Context, organization, projectID string) (*models.BucketScope, error)
- func (db *PostgresDB) GetBulkObjects(ctx context.Context, ids []string) ([]models.InternalObject, error)
- func (db *PostgresDB) GetFileUsage(ctx context.Context, objectID string) (*models.FileUsage, error)
- func (db *PostgresDB) GetFileUsageSummary(ctx context.Context, inactiveSince *time.Time) (models.FileUsageSummary, error)
- func (db *PostgresDB) GetFileUsageSummaryByResources(ctx context.Context, resources []string, includeUnscoped bool, ...) (models.FileUsageSummary, error)
- func (db *PostgresDB) GetFileUsageSummaryByScope(ctx context.Context, organization, project string, inactiveSince *time.Time) (models.FileUsageSummary, error)
- func (db *PostgresDB) GetObject(ctx context.Context, id string) (*models.InternalObject, error)
- func (db *PostgresDB) GetObjectsByChecksum(ctx context.Context, checksum string) ([]models.InternalObject, error)
- func (db *PostgresDB) GetObjectsByChecksums(ctx context.Context, checksums []string) (map[string][]models.InternalObject, error)
- func (db *PostgresDB) GetPendingLFSMeta(ctx context.Context, oid string) (*models.PendingLFSMeta, error)
- func (db *PostgresDB) GetS3Credential(ctx context.Context, bucket string) (*models.S3Credential, error)
- func (db *PostgresDB) GetServiceInfo(ctx context.Context) (*drs.Service, error)
- func (db *PostgresDB) GetTransferAttributionBreakdown(ctx context.Context, filter models.TransferAttributionFilter, groupBy string) ([]models.TransferAttributionBreakdown, error)
- func (db *PostgresDB) GetTransferAttributionBreakdownByResources(ctx context.Context, filter models.TransferAttributionFilter, groupBy string, ...) ([]models.TransferAttributionBreakdown, error)
- func (db *PostgresDB) GetTransferAttributionSummary(ctx context.Context, filter models.TransferAttributionFilter) (models.TransferAttributionSummary, error)
- func (db *PostgresDB) GetTransferAttributionSummaryByResources(ctx context.Context, filter models.TransferAttributionFilter, ...) (models.TransferAttributionSummary, error)
- func (db *PostgresDB) ListBucketScopes(ctx context.Context) ([]models.BucketScope, error)
- func (db *PostgresDB) ListBucketVisibilityRows(ctx context.Context, resources []string, ...) ([]models.BucketVisibilityRow, error)
- func (db *PostgresDB) ListFileUsage(ctx context.Context, limit, offset int, inactiveSince *time.Time) ([]models.FileUsage, error)
- func (db *PostgresDB) ListFileUsageByObjectIDs(ctx context.Context, ids []string) ([]models.FileUsage, error)
- func (db *PostgresDB) ListFileUsagePageByResources(ctx context.Context, resources []string, includeUnscoped bool, ...) ([]models.FileUsage, error)
- func (db *PostgresDB) ListFileUsagePageByScope(ctx context.Context, organization, project string, limit, offset int, ...) ([]models.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) ListObjectIDsPageByChecksum(ctx context.Context, ...) ([]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) ([]models.S3Credential, error)
- func (db *PostgresDB) PopPendingLFSMeta(ctx context.Context, oid string) (*models.PendingLFSMeta, 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 []models.ProviderTransferEvent) error
- func (db *PostgresDB) RecordTransferAttributionEvents(ctx context.Context, events []models.TransferAttributionEvent) error
- func (db *PostgresDB) RegisterObjects(ctx context.Context, objects []models.InternalObject) error
- func (db *PostgresDB) RemoveObjectControlledAccess(ctx context.Context, objectID, resource string) error
- func (db *PostgresDB) ResolveObjectAlias(ctx context.Context, aliasID string) (string, error)
- func (db *PostgresDB) SavePendingLFSMeta(ctx context.Context, entries []models.PendingLFSMeta) error
- func (db *PostgresDB) SaveS3Credential(ctx context.Context, cred *models.S3Credential) error
- func (db *PostgresDB) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []drs.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
}
PostgresDB implements DatabaseInterface
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][]drs.AccessMethod) error
func (*PostgresDB) CreateBucketScope ¶
func (db *PostgresDB) CreateBucketScope(ctx context.Context, scope *models.BucketScope) error
func (*PostgresDB) CreateObject ¶
func (db *PostgresDB) CreateObject(ctx context.Context, obj *models.InternalObject) error
func (*PostgresDB) CreateObjectAlias ¶
func (db *PostgresDB) CreateObjectAlias(ctx context.Context, aliasID, canonicalObjectID 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, bucket string) error
func (*PostgresDB) GetBucketScope ¶
func (db *PostgresDB) GetBucketScope(ctx context.Context, organization, projectID string) (*models.BucketScope, error)
func (*PostgresDB) GetBulkObjects ¶
func (db *PostgresDB) GetBulkObjects(ctx context.Context, ids []string) ([]models.InternalObject, error)
func (*PostgresDB) GetFileUsage ¶
func (*PostgresDB) GetFileUsageSummary ¶
func (db *PostgresDB) GetFileUsageSummary(ctx context.Context, inactiveSince *time.Time) (models.FileUsageSummary, error)
func (*PostgresDB) GetFileUsageSummaryByResources ¶ added in v0.2.8
func (db *PostgresDB) GetFileUsageSummaryByResources(ctx context.Context, resources []string, includeUnscoped bool, inactiveSince *time.Time) (models.FileUsageSummary, error)
func (*PostgresDB) GetFileUsageSummaryByScope ¶ added in v0.2.8
func (db *PostgresDB) GetFileUsageSummaryByScope(ctx context.Context, organization, project string, inactiveSince *time.Time) (models.FileUsageSummary, error)
func (*PostgresDB) GetObject ¶
func (db *PostgresDB) GetObject(ctx context.Context, id string) (*models.InternalObject, error)
func (*PostgresDB) GetObjectsByChecksum ¶
func (db *PostgresDB) GetObjectsByChecksum(ctx context.Context, checksum string) ([]models.InternalObject, error)
func (*PostgresDB) GetObjectsByChecksums ¶
func (db *PostgresDB) GetObjectsByChecksums(ctx context.Context, checksums []string) (map[string][]models.InternalObject, error)
func (*PostgresDB) GetPendingLFSMeta ¶
func (db *PostgresDB) GetPendingLFSMeta(ctx context.Context, oid string) (*models.PendingLFSMeta, error)
func (*PostgresDB) GetS3Credential ¶
func (db *PostgresDB) GetS3Credential(ctx context.Context, bucket string) (*models.S3Credential, error)
func (*PostgresDB) GetServiceInfo ¶
func (*PostgresDB) GetTransferAttributionBreakdown ¶ added in v0.2.5
func (db *PostgresDB) GetTransferAttributionBreakdown(ctx context.Context, filter models.TransferAttributionFilter, groupBy string) ([]models.TransferAttributionBreakdown, error)
func (*PostgresDB) GetTransferAttributionBreakdownByResources ¶ added in v0.2.8
func (db *PostgresDB) GetTransferAttributionBreakdownByResources(ctx context.Context, filter models.TransferAttributionFilter, groupBy string, resources []string) ([]models.TransferAttributionBreakdown, error)
func (*PostgresDB) GetTransferAttributionSummary ¶ added in v0.2.5
func (db *PostgresDB) GetTransferAttributionSummary(ctx context.Context, filter models.TransferAttributionFilter) (models.TransferAttributionSummary, error)
func (*PostgresDB) GetTransferAttributionSummaryByResources ¶ added in v0.2.8
func (db *PostgresDB) GetTransferAttributionSummaryByResources(ctx context.Context, filter models.TransferAttributionFilter, resources []string) (models.TransferAttributionSummary, error)
func (*PostgresDB) ListBucketScopes ¶
func (db *PostgresDB) ListBucketScopes(ctx context.Context) ([]models.BucketScope, error)
func (*PostgresDB) ListBucketVisibilityRows ¶ added in v0.2.8
func (db *PostgresDB) ListBucketVisibilityRows(ctx context.Context, resources []string, includeUnscoped, restrictToResources bool) ([]models.BucketVisibilityRow, error)
func (*PostgresDB) ListFileUsage ¶
func (*PostgresDB) ListFileUsageByObjectIDs ¶ added in v0.2.8
func (*PostgresDB) ListFileUsagePageByResources ¶ added in v0.2.8
func (*PostgresDB) ListFileUsagePageByScope ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsByChecksumsAndResources ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsByResources ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsByScope ¶ added in v0.2.5
func (*PostgresDB) ListObjectIDsByScopeAndResources ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsPageByChecksum ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsPageByResources ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsPageByScope ¶ added in v0.2.8
func (*PostgresDB) ListObjectIDsPageByURL ¶ added in v0.2.8
func (*PostgresDB) ListS3Credentials ¶
func (db *PostgresDB) ListS3Credentials(ctx context.Context) ([]models.S3Credential, error)
func (*PostgresDB) PopPendingLFSMeta ¶
func (db *PostgresDB) PopPendingLFSMeta(ctx context.Context, oid string) (*models.PendingLFSMeta, 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 ¶ added in v0.2.5
func (db *PostgresDB) RecordProviderTransferEvents(ctx context.Context, events []models.ProviderTransferEvent) error
func (*PostgresDB) RecordTransferAttributionEvents ¶ added in v0.2.5
func (db *PostgresDB) RecordTransferAttributionEvents(ctx context.Context, events []models.TransferAttributionEvent) error
func (*PostgresDB) RegisterObjects ¶
func (db *PostgresDB) RegisterObjects(ctx context.Context, objects []models.InternalObject) error
func (*PostgresDB) RemoveObjectControlledAccess ¶ added in v0.2.9
func (db *PostgresDB) RemoveObjectControlledAccess(ctx context.Context, objectID, resource string) error
func (*PostgresDB) ResolveObjectAlias ¶
func (*PostgresDB) SavePendingLFSMeta ¶
func (db *PostgresDB) SavePendingLFSMeta(ctx context.Context, entries []models.PendingLFSMeta) error
func (*PostgresDB) SaveS3Credential ¶
func (db *PostgresDB) SaveS3Credential(ctx context.Context, cred *models.S3Credential) error
func (*PostgresDB) UpdateObjectAccessMethods ¶
func (db *PostgresDB) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []drs.AccessMethod) error
Click to show internal directories.
Click to hide internal directories.