catalogviewsdynamodb

package
v1.9.76 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AvailabilityTypeOwner   = "OWNED"
	AvailabilityTypeVisitor = "VISITOR"

	RecordTypeSummary = "SUMMARY"
	RecordTypeCovers  = "COVERS"
)

Variables

View Source
var (
	RecordTypeSummaryFilter = RecordTypeSummary
	RecordTypeCoversFilter  = RecordTypeCovers
)

Functions

This section is empty.

Types

type AlbumCoversRecord added in v1.9.63

type AlbumCoversRecord struct {
	appdynamodb.TablePk
	AlbumOwner       string
	AlbumFolderName  string
	AvailabilityType string
	UserId           string
	RecordType       string
	Covers           []CoverRecord `dynamodbav:",omitempty"`
	AlbumViewIndexPK string
}

type AlbumSummaryRecord added in v1.9.61

type AlbumSummaryRecord struct {
	appdynamodb.TablePk
	AlbumOwner       string
	AlbumFolderName  string
	AvailabilityType string
	UserId           string
	RecordType       string `dynamodbav:",omitempty"`
	Count            int
	AlbumName        string `dynamodbav:",omitempty"`
	AlbumStart       string `dynamodbav:",omitempty"`
	AlbumEnd         string `dynamodbav:",omitempty"`
	AlbumViewIndexPK string
}

type AlbumViewRepository

type AlbumViewRepository struct {
	Client    *dynamodb.Client
	TableName string
}

func (*AlbumViewRepository) DeleteAllRowsForAlbum added in v1.9.61

func (a *AlbumViewRepository) DeleteAllRowsForAlbum(ctx context.Context, albumId catalog.AlbumId) error

func (*AlbumViewRepository) DeleteCoversForAllViewers added in v1.9.63

func (a *AlbumViewRepository) DeleteCoversForAllViewers(ctx context.Context, albumId catalog.AlbumId) error

DeleteCoversForAllViewers removes the covers row of every viewer for the album. Summary rows are untouched; a next ListSummariesForUser returns the album with an empty cover set.

func (*AlbumViewRepository) DeleteLegacyRowsForUser added in v1.9.61

func (a *AlbumViewRepository) DeleteLegacyRowsForUser(ctx context.Context, userId usermodel.UserId) error

func (*AlbumViewRepository) DeleteRow added in v1.9.61

func (a *AlbumViewRepository) DeleteRow(ctx context.Context, availability catalogviews.Availability, albumId catalog.AlbumId) error

func (*AlbumViewRepository) IncrementCountForAllViewers added in v1.9.61

func (a *AlbumViewRepository) IncrementCountForAllViewers(ctx context.Context, updates []catalogviews.AlbumCountDiff) error

func (*AlbumViewRepository) ListSummariesForUser added in v1.9.61

func (a *AlbumViewRepository) ListSummariesForUser(ctx context.Context, userId usermodel.UserId) ([]catalogviews.UserAlbumSummary, error)

func (*AlbumViewRepository) ListSummariesForUserAndOwners added in v1.9.61

func (a *AlbumViewRepository) ListSummariesForUserAndOwners(ctx context.Context, userId usermodel.UserId, owner ...ownermodel.Owner) ([]catalogviews.UserAlbumSummary, error)

func (*AlbumViewRepository) PutCoversForAllViewers added in v1.9.63

func (a *AlbumViewRepository) PutCoversForAllViewers(ctx context.Context, albumId catalog.AlbumId, covers []catalog.Cover) error

PutCoversForAllViewers upserts the covers row for every viewer who already has a summary row for the album. The covers row lives at a sibling SK (`...#COVERS`) in the viewer's partition so cover writes never touch the main summary row.

func (*AlbumViewRepository) PutSummaries added in v1.9.61

func (a *AlbumViewRepository) PutSummaries(ctx context.Context, summaries []catalogviews.AlbumSummaryForUsers) error

func (*AlbumViewRepository) RenameAlbum added in v1.9.61

func (a *AlbumViewRepository) RenameAlbum(ctx context.Context, existingId, renamedId catalog.AlbumId, newName string) error

func (*AlbumViewRepository) SetCountForAllViewers added in v1.9.61

func (a *AlbumViewRepository) SetCountForAllViewers(ctx context.Context, updates []catalogviews.AlbumCount) error

func (*AlbumViewRepository) SetDisplayFieldsForAllViewers added in v1.9.61

func (a *AlbumViewRepository) SetDisplayFieldsForAllViewers(ctx context.Context, albumId catalog.AlbumId, name string, start, end time.Time) error

type CoverRecord added in v1.9.63

type CoverRecord struct {
	MediaId  string
	Filename string
	Origin   string
}

Jump to

Keyboard shortcuts

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