Versions in this module Expand all Collapse all v0 v0.1.0 Jul 18, 2026 Changes in this version + var ErrNotFound = errors.New("assetsdb: not found") + func Encode(w io.Writer, dataPackage *DataPackage) error + func ExtNoDot(p string) string + func Hash(contents []byte) string + func ItemID(sourceID, pathInSource, sub string) string + func MediaType(path string) string + func Slugify(s string) string + func Title(base string) string + func Tokenize(p string) []string + type DB struct + func Read(root string) (*DB, error) + func (db *DB) ItemsForSource(sourceID string) []Item + func (db *DB) LicenseFor(item Item) License + func (db *DB) Open(item Item) (io.ReadCloser, error) + func (db *DB) OpenSource(sourceID string) (io.ReadCloser, error) + func (db *DB) Search(query string) []Item + func (db *DB) SourceByID(id string) (Source, bool) + func (db *DB) Sources() []Source + type DataPackage struct + Created string + Licenses []License + Name string + Resources []Item + SchemaVersion int + Sources []Source + Title string + Version string + func Decode(r io.Reader) (*DataPackage, error) + type Ingester interface + Ingest func(ctx context.Context, spec PackSpec) (src Source, items []Item, zip []byte, err error) + Name func() string + type Item struct + Bytes int64 + Format string + Hash string + ID string + Kind Kind + MediaType string + Name string + Path string + Provenance *Provenance + Region *Region + Source string + Title string + Tokens []string + type Kind string + const KindAudio + const KindFont + const KindModel3D + const KindSprite2D + func Classify(path string) (kind Kind, ok bool) + type License struct + Name string + Path string + Title string + func LicenseForSPDX(spdx string) License + type NameAllocator struct + func NewNameAllocator() *NameAllocator + func (a *NameAllocator) Allocate(base string) string + type PackSpec struct + ID string + License string + Name string + Source string + Tags []string + Theme string + URL string + type Provenance struct + CreatedAt string + Generator string + LicenseAssertion string + Model string + Params map[string]string + Prompt string + type Region struct + Height int + Width int + X int + Y int + type Source struct + Description string + Licenses []License + Name string + Origin string + Path string + Tags []string + Title string + Type string + func CuratedSource(spec PackSpec, license License) Source