catalog

package
v0.0.0-...-2b8c4c7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package catalog combines catalog definitions with transport and mapping.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSearchParams

func BuildSearchParams(def CatalogDefinition, query SearchQuery) map[string]string

Types

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

func New

func New(def CatalogDefinition, client *transport.Client, transformers *mapping.TransformerRegistry) *Catalog

func NewFromDefinition

func NewFromDefinition(definition CatalogDefinition) *Catalog

func (*Catalog) Search

func (c *Catalog) Search(ctx context.Context, query SearchQuery) ([]record.Record, error)

func (*Catalog) SearchRaw

func (c *Catalog) SearchRaw(ctx context.Context, query SearchQuery) (transport.RawResponse, error)

type CatalogDefinition

type CatalogDefinition = record.CatalogDefinition

func LoadCatalog

func LoadCatalog(path string) (CatalogDefinition, error)

func LoadCatalogDefinition

func LoadCatalogDefinition(path string) (CatalogDefinition, error)

LoadCatalogDefinition reads and validates a catalog YAML file.

type ExtractionDefinition

type ExtractionDefinition = record.ExtractionDefinition

type IdentifierDefinition

type IdentifierDefinition = record.IdentifierDefinition

type MappingDefinition

type MappingDefinition = record.MappingDefinition

type SearchDefinition

type SearchDefinition = record.SearchDefinition

type SearchFieldDefinition

type SearchFieldDefinition = record.SearchFieldDefinition

type SearchQuery

type SearchQuery struct {
	Keyword string
	Title   string
	Creator string
	ISBN    string
	Start   int
	Limit   int
}

Jump to

Keyboard shortcuts

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