postgres

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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][]drs.AccessMethod) error

func (*PostgresDB) CreateBucketScope

func (db *PostgresDB) CreateBucketScope(ctx context.Context, scope *core.BucketScope) error

func (*PostgresDB) CreateObject

func (db *PostgresDB) CreateObject(ctx context.Context, obj *core.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) DeleteS3Credential

func (db *PostgresDB) DeleteS3Credential(ctx context.Context, bucket string) error

func (*PostgresDB) GetBucketScope

func (db *PostgresDB) GetBucketScope(ctx context.Context, organization, projectID string) (*core.BucketScope, error)

func (*PostgresDB) GetBulkObjects

func (db *PostgresDB) GetBulkObjects(ctx context.Context, ids []string) ([]core.InternalObject, error)

func (*PostgresDB) GetFileUsage

func (db *PostgresDB) GetFileUsage(ctx context.Context, objectID string) (*core.FileUsage, error)

func (*PostgresDB) GetFileUsageSummary

func (db *PostgresDB) GetFileUsageSummary(ctx context.Context, inactiveSince *time.Time) (core.FileUsageSummary, error)

func (*PostgresDB) GetObject

func (db *PostgresDB) GetObject(ctx context.Context, id string) (*core.InternalObject, error)

func (*PostgresDB) GetObjectsByChecksum

func (db *PostgresDB) GetObjectsByChecksum(ctx context.Context, checksum string) ([]core.InternalObject, error)

func (*PostgresDB) GetObjectsByChecksums

func (db *PostgresDB) GetObjectsByChecksums(ctx context.Context, checksums []string) (map[string][]core.InternalObject, error)

func (*PostgresDB) GetPendingLFSMeta

func (db *PostgresDB) GetPendingLFSMeta(ctx context.Context, oid string) (*core.PendingLFSMeta, error)

func (*PostgresDB) GetS3Credential

func (db *PostgresDB) GetS3Credential(ctx context.Context, bucket string) (*core.S3Credential, error)

func (*PostgresDB) GetServiceInfo

func (db *PostgresDB) GetServiceInfo(ctx context.Context) (*drs.Service, error)

func (*PostgresDB) ListBucketScopes

func (db *PostgresDB) ListBucketScopes(ctx context.Context) ([]core.BucketScope, error)

func (*PostgresDB) ListFileUsage

func (db *PostgresDB) ListFileUsage(ctx context.Context, limit, offset int, inactiveSince *time.Time) ([]core.FileUsage, error)

func (*PostgresDB) ListObjectIDsByResourcePrefix

func (db *PostgresDB) ListObjectIDsByResourcePrefix(ctx context.Context, resourcePrefix string) ([]string, error)

func (*PostgresDB) ListS3Credentials

func (db *PostgresDB) ListS3Credentials(ctx context.Context) ([]core.S3Credential, error)

func (*PostgresDB) PopPendingLFSMeta

func (db *PostgresDB) PopPendingLFSMeta(ctx context.Context, oid string) (*core.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) RegisterObjects

func (db *PostgresDB) RegisterObjects(ctx context.Context, objects []core.InternalObject) error

func (*PostgresDB) ResolveObjectAlias

func (db *PostgresDB) ResolveObjectAlias(ctx context.Context, aliasID string) (string, error)

func (*PostgresDB) SavePendingLFSMeta

func (db *PostgresDB) SavePendingLFSMeta(ctx context.Context, entries []core.PendingLFSMeta) error

func (*PostgresDB) SaveS3Credential

func (db *PostgresDB) SaveS3Credential(ctx context.Context, cred *core.S3Credential) error

func (*PostgresDB) UpdateObjectAccessMethods

func (db *PostgresDB) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []drs.AccessMethod) error

Jump to

Keyboard shortcuts

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