Documentation ¶
Index ¶
- type Audio
- type Author
- type Body
- type CipherData
- type CipherReference
- type Compression
- type Container
- type Content
- type Date
- type EncryptedData
- type Encryption
- type EncryptionMethod
- type EncryptionProperty
- type Epub
- type Identifier
- type KeyInfo
- type LCP
- type Manifest
- type Metadata
- type Metafield
- type NavPoint
- type Ncx
- type Opf
- type PageList
- type PageTarget
- type Par
- type Reference
- type RetrievalMethod
- type Rootfile
- type SMIL
- type Seq
- type Spine
- type SpineItem
- type Subject
- type Text
- type Title
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { Data string `xml:",chardata"` FileAs string `xml:"file-as,attr"` Role string `xml:"role,attr"` ID string `xml:"id,attr"` }
Author author
type CipherData ¶
type CipherData struct {
CipherReference CipherReference `xml:"CipherReference"`
}
type CipherReference ¶
type CipherReference struct {
URI string `xml:"URI,attr"`
}
type Compression ¶
type EncryptedData ¶
type EncryptedData struct { EncryptionMethod EncryptionMethod `xml:"EncryptionMethod"` KeyInfo KeyInfo `xml:"KeyInfo"` CipherData CipherData `xml:"CipherData"` EncryptionProperties []EncryptionProperty `xml:"EncryptionProperties>EncryptionProperty"` }
type Encryption ¶
type Encryption struct {
EncryptedData []EncryptedData `xml:"EncryptedData"`
}
Encryption encruption.xml
type EncryptionMethod ¶
type EncryptionMethod struct {
Algorithm string `xml:"Algorithm,attr"`
}
type EncryptionProperty ¶
type EncryptionProperty struct {
Compression Compression `xml:"Compression"`
}
type Epub ¶
type Epub struct { Ncx Ncx NcxPath string Opf Opf Container Container Encryption Encryption LCP LCP // contains filtered or unexported fields }
Epub represent epub data
func OpenEpubReader ¶
OpenEpubReader open and parse epub
func (*Epub) Open ¶
func (epub *Epub) Open(filepath string) (io.ReadCloser, error)
Open open resource file
type Identifier ¶
type Identifier struct { Data string `xml:",chardata"` ID string `xml:"id,attr"` Scheme string `xml:"scheme,attr"` }
Identifier identifier
type KeyInfo ¶
type KeyInfo struct { Resource string `xml:",chardata"` RetrievalMethod RetrievalMethod `xml:"RetrievalMethod"` }
type LCP ¶
type LCP struct { ID string `json:"id"` Issued *time.Time `json:"issued"` Provider string `json:"provider"` Updated *time.Time `json:"updated,omitempty"` Encryption struct { Profile string `json:"profile"` ContentKey struct { EncryptedValue string `json:"encrypted_value"` Algorithm string `json:"algorithm"` } `json:"content_key"` UserKey struct { TextHint string `json:"text_hint"` Algorithm string `json:"algorithm"` KeyCheck string `json:"key_check"` } `json:"user_key"` } `json:"encryption"` Links []struct { Rel string `json:"rel"` Href string `json:"href"` Title string `json:"title"` Type string `json:"type"` Templated string `json:"templated"` Profile string `json:"profile"` Length int `json:"length"` Hash string `json:"hash"` } `json:"links"` Rights struct { Print int `json:"print"` Copy int `json:"copy"` Start *time.Time `json:"start"` End *time.Time `json:"end"` } `json:"rights"` User struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` Encrypted []string `json:"encrypted"` } `json:"user"` Signature struct { Algorithm string `json:"algorithm"` Certificate string `json:"certificate"` Value string `json:"value"` } `json:"signature"` }
LCP struct for the lcp license
type Manifest ¶
type Manifest struct { ID string `xml:"id,attr"` Href string `xml:"href,attr"` MediaType string `xml:"media-type,attr"` Fallback string `xml:"fallback,attr"` Properties string `xml:"properties,attr"` MediaOverlay string `xml:"media-overlay,attr"` }
Manifest manifest
type Metadata ¶
type Metadata struct { Title []Title `xml:"title"` Language []string `xml:"language"` Identifier []Identifier `xml:"identifier"` Creator []Author `xml:"creator"` Subject []Subject `xml:"subject"` Description []string `xml:"description"` Publisher []string `xml:"publisher"` Contributor []Author `xml:"contributor"` Date []Date `xml:"date"` Type []string `xml:"type"` Format []string `xml:"format"` Source []string `xml:"source"` Relation []string `xml:"relation"` Coverage []string `xml:"coverage"` Rights []string `xml:"rights"` Meta []Metafield `xml:"meta"` }
Metadata metadata
type Metafield ¶
type Metafield struct { Name string `xml:"name,attr"` Content string `xml:"content,attr"` Refine string `xml:"refines,attr"` Property string `xml:"property,attr"` Data string `xml:",chardata"` ID string `xml:"id,attr"` Lang string `xml:"lang,attr"` }
Metafield metafield
type Opf ¶
type Opf struct { Metadata Metadata `xml:"metadata"` Manifest []Manifest `xml:"manifest>item"` Spine Spine `xml:"spine"` Guide []Reference `xml:"guide>reference"` UniqueIdentifier string `xml:"unique-identifier,attr"` Dir string `xml:"dir,attr"` Version string `xml:"version,attr"` }
Opf content.opf
type PageList ¶
type PageList struct { PageTarget []PageTarget `xml:"pageTarget"` Class string `xml:"class,attr"` ID string `xml:"id,attr"` }
PageList page list
type PageTarget ¶
type PageTarget struct { ID string `xml:"id,attr"` Text string `xml:"navLabel>text"` Value string `xml:"value,attr"` Type string `xml:"type,attr"` PlayOrder int `xml:"playOrder,attr"` Content Content `xml:"content"` }
PageTarget page target
type Reference ¶
type Reference struct { Href string `xml:"href,attr"` Title string `xml:"title,attr"` Type string `xml:"type,attr"` }
Reference reference in guide
type RetrievalMethod ¶
type Rootfile ¶
type Rootfile struct { Path string `xml:"full-path,attr"` Type string `xml:"media-type,attr"` Version string `xml:"version,attr"` }
Rootfile root file
type Spine ¶
type Spine struct { ID string `xml:"id,attr"` Toc string `xml:"toc,attr"` PageProgression string `xml:"page-progression-direction,attr"` Items []SpineItem `xml:"itemref"` }
Spine spine
type SpineItem ¶
type SpineItem struct { IDref string `xml:"idref,attr"` Linear string `xml:"linear,attr"` ID string `xml:"id,attr"` Properties string `xml:"properties,attr"` }
SpineItem spine item
Source Files ¶
Click to show internal directories.
Click to hide internal directories.