Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Parsers []parser.PublicationParser // Parsers used to open a publication, in addition to the default parsers. IgnoreDefaultParsers bool // When true, only parsers provided in parsers will be used. InferA11yMetadata InferA11yMetadata // When not empty, additional accessibility metadata will be infered from the manifest. InferPageCount bool // When true, will infer `Metadata.NumberOfPages` from the generated position list. ArchiveFactory archive.ArchiveFactory // Opens an archive (e.g. ZIP, RAR), optionally protected by credentials. HttpClient *http.Client // Service performing HTTP requests. }
type InferA11yMetadata ¶
type InferA11yMetadata uint8
const ( // No accessibility metadata will be infered. InferA11yMetadataNo InferA11yMetadata = 0 + iota // Accessibility metadata will be infered from the manifest and merged in // the `Accessibility` object. InferA11yMetadataMerged // Accessibility metadata will be infered from the manifest and added // separately in the `InferredAccessibility` object. InferA11yMetadataSplit )
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer opens a `Publication` using a list of parsers.
The `Streamer` is configured to use Readium's default parsers, which you can bypass using `Config.IgnoreDefaultParsers`. However, you can provide additional `Config.Parsers` which will take precedence over the default ones. This can also be used to provide an alternative configuration of a default parser.
func (Streamer) Open ¶
func (s Streamer) Open(a asset.PublicationAsset, credentials string) (*pub.Publication, error)
Parses a [Publication] from the given asset.
Click to show internal directories.
Click to hide internal directories.