Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CatalogURL = "https://app.jw-cdn.org/catalogs/publications/v4/%s/catalog.db.gz"
CatalogURL is the URL to the publication catalog
View Source
var ManifestURL = "https://app.jw-cdn.org/catalogs/publications/v4/manifest.json"
ManifestURL is the URL to the publication manifest
Functions ¶
func CatalogExists ¶
CatalogExists checks if catalog.db exists at path
func CatalogNeedsUpdate ¶
CatalogNeedsUpdate checks if catalog.db located at path is still up-to-date. For now it just makes sure that it is younger than one month. If it can't find a file at path, it returns true
func CatalogSize ¶
CatalogSize returns the size of the catalog.db at path
Types ¶
type Progress ¶
type Progress struct { Size int64 BytesComplete int64 BytesPerSecond float64 Progress float64 Duration time.Duration ETA time.Time Done bool }
Progress represents the progress of a running download
type Publication ¶
type Publication struct { ID int PublicationRootKeyID int MepsLanguageID int PublicationTypeID int IssueTagNumber int Title string IssueTitle sql.NullString ShortTitle string CoverTitle sql.NullString UndatedTitle sql.NullString UndatedReferenceTitle sql.NullString Year int Symbol string KeySymbol sql.NullString Reserved int }
Publication represents a publication with all its information from the catalogDB
func LookupPublication ¶
func LookupPublication(dbPath string, query Lookup) (Publication, error)
LookupPublication looks up a publication from catalogDB located at dbPath
func (Publication) MarshalJSON ¶
func (m Publication) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON encoding of the entry
Click to show internal directories.
Click to hide internal directories.