store

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore added in v1.2.0

type Datastore struct {
	Backend Storer
}

func (*Datastore) CheckAllBundleContentsAreApproved added in v1.2.0

func (ds *Datastore) CheckAllBundleContentsAreApproved(ctx context.Context, bundleID string) (bool, error)

func (*Datastore) CheckBundleExists added in v1.3.0

func (ds *Datastore) CheckBundleExists(ctx context.Context, bundleID string) (bool, error)

func (*Datastore) CheckBundleExistsByTitle added in v1.4.0

func (ds *Datastore) CheckBundleExistsByTitle(ctx context.Context, title string) (bool, error)

func (*Datastore) CheckBundleExistsByTitleUpdate added in v1.4.0

func (ds *Datastore) CheckBundleExistsByTitleUpdate(ctx context.Context, title, excludeID string) (bool, error)

func (*Datastore) CheckContentItemExistsByDatasetEditionVersion added in v1.3.0

func (ds *Datastore) CheckContentItemExistsByDatasetEditionVersion(ctx context.Context, datasetID, editionID string, versionID int) (bool, error)

func (*Datastore) CreateBundle added in v1.4.0

func (ds *Datastore) CreateBundle(ctx context.Context, bundle *models.Bundle) error

func (*Datastore) CreateContentItem added in v1.3.0

func (ds *Datastore) CreateContentItem(ctx context.Context, contentItem *models.ContentItem) error

func (*Datastore) CreateEvent added in v1.10.0

func (ds *Datastore) CreateEvent(ctx context.Context, event *models.Event) error

func (*Datastore) DeleteBundle added in v1.4.0

func (ds *Datastore) DeleteBundle(ctx context.Context, id string) (err error)

func (*Datastore) DeleteContentItem added in v1.4.0

func (ds *Datastore) DeleteContentItem(ctx context.Context, contentItemID string) error

func (*Datastore) GetBundle added in v1.3.0

func (ds *Datastore) GetBundle(ctx context.Context, bundleID string) (*models.Bundle, error)

func (*Datastore) GetBundleContentsForBundle added in v1.4.0

func (ds *Datastore) GetBundleContentsForBundle(ctx context.Context, bundleID string) (*[]models.ContentItem, error)

func (*Datastore) GetBundlesByPreviewTeamID added in v1.19.0

func (ds *Datastore) GetBundlesByPreviewTeamID(ctx context.Context, teamID string) ([]*models.Bundle, error)

func (*Datastore) GetContentItemByBundleIDAndContentItemID added in v1.4.0

func (ds *Datastore) GetContentItemByBundleIDAndContentItemID(ctx context.Context, bundleID, contentItemID string) (*models.ContentItem, error)

func (*Datastore) GetContentItemsByBundleID added in v1.4.0

func (ds *Datastore) GetContentItemsByBundleID(ctx context.Context, bundleID string) ([]*models.ContentItem, error)

func (*Datastore) ListBundleContentIDsWithoutLimit added in v1.4.0

func (ds *Datastore) ListBundleContentIDsWithoutLimit(ctx context.Context, bundleID string) ([]*models.ContentItem, error)

func (*Datastore) ListBundleContents added in v1.4.0

func (ds *Datastore) ListBundleContents(ctx context.Context, bundleID string, offset, limit int) ([]*models.ContentItem, int, error)

func (*Datastore) ListBundleEvents added in v1.3.0

func (ds *Datastore) ListBundleEvents(ctx context.Context, offset, limit int, bundleID string, after, before *time.Time) ([]*models.Event, int, error)

func (*Datastore) ListBundles added in v1.2.0

func (ds *Datastore) ListBundles(ctx context.Context, offset, limit int, bundleFilters *filters.BundleFilters) ([]*models.Bundle, int, error)

func (*Datastore) UpdateBundle added in v1.4.0

func (ds *Datastore) UpdateBundle(ctx context.Context, id string, update *models.Bundle) (*models.Bundle, error)

func (*Datastore) UpdateBundleETag added in v1.3.0

func (ds *Datastore) UpdateBundleETag(ctx context.Context, bundleID, email string) (*models.Bundle, error)

func (*Datastore) UpdateContentItemDatasetInfo added in v1.4.0

func (ds *Datastore) UpdateContentItemDatasetInfo(ctx context.Context, contentItemID, title, state string) error
func (ds *Datastore) UpdateContentItemMetadataAndLinks(ctx context.Context, contentItemID, datasetID, editionID, editLink, previewLink string) error

func (*Datastore) UpdateContentItemState added in v1.4.0

func (ds *Datastore) UpdateContentItemState(ctx context.Context, contentItemID, state string) error

type MongoDB

type MongoDB interface {
	Close(context.Context) error
	Checker(context.Context, *healthcheck.CheckState) error
	// contains filtered or unexported methods
}

MongoDB represents all the required methods from mongo DB

type Storer

type Storer interface {
	// contains filtered or unexported methods
}

Storer represents basic data access via Get, Remove and Upsert methods, abstracting it from mongoDB or graphDB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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