Documentation
¶
Overview ¶
Package postgres implements the Trove store interface using grove ORM (PostgreSQL).
Index ¶
- Variables
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateBucket(ctx context.Context, b *model.Bucket) error
- func (s *Store) CreateObject(ctx context.Context, o *model.Object) error
- func (s *Store) CreateUploadSession(ctx context.Context, u *model.UploadSession) error
- func (s *Store) DB() *grove.DB
- func (s *Store) DecrementCASRef(ctx context.Context, hash string) error
- func (s *Store) DeleteBucket(ctx context.Context, id string) error
- func (s *Store) DeleteCASEntry(ctx context.Context, hash string) error
- func (s *Store) DeleteQuota(ctx context.Context, tenantKey string) error
- func (s *Store) GetBucket(ctx context.Context, id string) (*model.Bucket, error)
- func (s *Store) GetBucketByName(ctx context.Context, name string) (*model.Bucket, error)
- func (s *Store) GetCASEntry(ctx context.Context, hash string) (*model.CASEntry, error)
- func (s *Store) GetObject(ctx context.Context, id string) (*model.Object, error)
- func (s *Store) GetObjectByKey(ctx context.Context, bucketID, key string) (*model.Object, error)
- func (s *Store) GetQuota(ctx context.Context, tenantKey string) (*model.Quota, error)
- func (s *Store) GetUploadSession(ctx context.Context, id string) (*model.UploadSession, error)
- func (s *Store) IncrementCASRef(ctx context.Context, hash string) error
- func (s *Store) ListAllObjects(ctx context.Context, limit int) ([]*model.Object, error)
- func (s *Store) ListBuckets(ctx context.Context, tenantKey string) ([]*model.Bucket, error)
- func (s *Store) ListCASEntries(ctx context.Context) ([]*model.CASEntry, error)
- func (s *Store) ListExpiredUploads(ctx context.Context) ([]*model.UploadSession, error)
- func (s *Store) ListObjects(ctx context.Context, bucketID string, opts ...store.ListOption) ([]*model.Object, error)
- func (s *Store) ListQuotas(ctx context.Context) ([]*model.Quota, error)
- func (s *Store) ListUnpinnedCAS(ctx context.Context) ([]*model.CASEntry, error)
- func (s *Store) ListUploads(ctx context.Context) ([]*model.UploadSession, error)
- func (s *Store) Migrate(ctx context.Context, extraGroups ...*migrate.Group) error
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) PutCASEntry(ctx context.Context, entry *model.CASEntry) error
- func (s *Store) SetCASPinned(ctx context.Context, hash string, pinned bool) error
- func (s *Store) SetQuota(ctx context.Context, q *model.Quota) error
- func (s *Store) SoftDeleteObject(ctx context.Context, id string) error
- func (s *Store) UpdateBucket(ctx context.Context, b *model.Bucket) error
- func (s *Store) UpdateObject(ctx context.Context, o *model.Object) error
- func (s *Store) UpdateQuotaUsage(ctx context.Context, tenantKey string, deltaBytes, deltaObjects int64) error
- func (s *Store) UpdateUploadSession(ctx context.Context, u *model.UploadSession) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations = migrate.NewGroup("trove")
Migrations is the Trove migration group for PostgreSQL.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements store.Store using grove ORM (PostgreSQL).
func (*Store) CreateBucket ¶
func (*Store) CreateObject ¶
func (*Store) CreateUploadSession ¶
func (*Store) DecrementCASRef ¶
func (*Store) DeleteCASEntry ¶
func (*Store) DeleteQuota ¶
func (*Store) GetBucketByName ¶
func (*Store) GetCASEntry ¶
func (*Store) GetObjectByKey ¶
func (*Store) GetUploadSession ¶
func (*Store) IncrementCASRef ¶
func (*Store) ListAllObjects ¶
func (*Store) ListBuckets ¶
func (*Store) ListCASEntries ¶
func (*Store) ListExpiredUploads ¶
func (*Store) ListObjects ¶
func (*Store) ListUnpinnedCAS ¶
func (*Store) ListUploads ¶
func (*Store) PutCASEntry ¶
func (*Store) SetCASPinned ¶
func (*Store) SoftDeleteObject ¶
func (*Store) UpdateBucket ¶
func (*Store) UpdateObject ¶
func (*Store) UpdateQuotaUsage ¶
func (*Store) UpdateUploadSession ¶
Click to show internal directories.
Click to hide internal directories.