gnd

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const CHECKSUMFILE = "001_Pruefsumme_Checksum.txt"
View Source
const SYNCTIMELAYOUT = time.RFC3339

Variables

This section is empty.

Functions

func GetControlfield

func GetControlfield(doc *marc21struct.Record, tag string) []string

func GetSubfield

func GetSubfield(doc *marc21struct.Record, tag, ind1, ind2, code string) []string

func IsNotFound

func IsNotFound(err error) bool

Types

type Controlfield

type Controlfield struct {
	Tag  string `xml:"tag,attr" json:"tag" example:"001"`
	Text string `xml:",chardata" json:"text" example:"1298776236"`
	Type string `xml:"-" json:"-"`
}

Controlfield contains a controlfield entry

type Controlfields

type Controlfields []*Controlfield

type Datafield

type Datafield struct {
	Tag       string      `xml:"tag,attr" json:"tag" example:"075"`
	Ind1      string      `xml:"ind1,attr" json:"ind1,omitempty" example:" "`
	Ind2      string      `xml:"ind2,attr" json:"ind2,omitempty" example:" "`
	Subfields []*Subfield `xml:"subfield" json:"subfield,omitempty"`
}

Datafield contains a datafield entry

type GND

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

func NewGND

func NewGND(dbFolder, gndURL, oai, authority string, interval time.Duration, logger zLogger.ZLogger) (*GND, error)

func (*GND) Close

func (gnd *GND) Close() error

func (*GND) Get

func (gnd *GND) Get(identifier string) (*marc21struct.Record, error)

func (*GND) Iterate

func (gnd *GND) Iterate() error

func (*GND) Sync

func (gnd *GND) Sync(wait time.Duration, wg *sync.WaitGroup) context.CancelFunc

type Leader

type Leader struct {
	Text string `xml:",chardata" json:"text" example:"00000nz  a2200000oc 4500"`
}

Leader is for containing the text string of the MARC record Leader

type Subfield

type Subfield struct {
	Code string `xml:"code,attr" json:"code" example:"2"`
	Text string `xml:",chardata" json:"text" example:"gndgen"`
}

Subfield contains a subfield entry

Jump to

Keyboard shortcuts

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