Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Entries ¶ added in v0.1.75
Entries holds a list of license entries keyed by ISSN. The ISSN should be written as 1234-567X, according to the standard (https://en.wikipedia.org/wik i/International_Standard_Serial_Number#Code_format). The format of the ISSN is an eight digit code, divided by a hyphen into two four-digit numbers. Not an interface since it should not be more complicated than this.
type Entry ¶ added in v0.1.75
type Entry struct { Begin Signature End Signature Embargo time.Duration EmbargoDisallowEarlier bool }
Entry is a reduced holding file entry. Usually, moving wall allow the items, that lie earlier than the boundary. If EmbargoDisallowEarlier is set, the effect is reversed.
func (Entry) Covers ¶ added in v0.1.75
Covers returns true if the given signature lies inside the interval defined by the entry and the moving wall is not hit. If there the dates are not comparable the volume and issue comparisons do not make much sense. However, if there is a date, we are ok with a missing volume or a missing issue.
type File ¶ added in v0.1.75
File is the interface implemented by all holdings file formats. It can return a list of entries.
type License ¶
License exposes methods to let clients check their own validity in the context of this license. TODO(miku): Only once method is required: Covers.
type ParseError ¶ added in v0.1.75
type ParseError struct {
Errors []error
}
ParseError collects unmarshal errors.
func (ParseError) Error ¶ added in v0.1.75
func (e ParseError) Error() string
Error returns the number of errors encountered.
type Signature ¶ added in v0.1.75
Signature is a bag of information of the record from which coverage can be determined. Date should comparable strings, like 2010 or 2010-12-21. The volume and issue are parsed as ints, with noise allowed, like "Vol. 1".
func (Signature) IssueInt ¶ added in v0.1.75
IssueInt returns the issue as int in a best effort manner.