Documentation
¶
Overview ¶
Package collitems writes and reads one collection item at a time (#2260): the append the asset viewer's Add to collection makes, and the summary of a collection's sections the picker shows. The whole-collection writes (create, rename, the section list replaced at once) stay in portalstore, whose collection store answers these two by calling here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCollectionNotFound = errors.New("collection not found")
ErrCollectionNotFound is the refusal of an append to a collection that does not exist or was deleted.
Functions ¶
func AppendItem ¶
func AppendItem(ctx context.Context, db *sql.DB, collectionID, sectionID, assetID string) (portaldomain.AppendedItem, error)
AppendItem adds one asset at the end of one section (#2260). It holds the collection row for the transaction, so two appends to one collection, or an append beside a full section replace that also writes the row, take turns rather than interleaving positions.
func SectionSummaries ¶
func SectionSummaries(ctx context.Context, db *sql.DB, collectionIDs []string, assetID string) (map[string][]portaldomain.SectionSummary, error)
SectionSummaries reads the sections of the given collections in one statement, each marked with whether assetID is among its items.
Types ¶
This section is empty.