Documentation ¶
Index ¶
- func AbortNotification(pub Publication, lcpsv string, v2 bool, username string, password string) error
- func NotifyCMS(pub Publication, notifyURL string, verbose bool) error
- func NotifyLCPServer(pub Publication, lcpsv string, v2 bool, username string, password string, ...) error
- func StoreS3Publication(inputPath, storagePath, name string) error
- type CMSMsg
- type Coded
- type Entity
- type LCPServerMsgV2
- type Publication
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortNotification ¶
func AbortNotification(pub Publication, lcpsv string, v2 bool, username string, password string) error
AbortNotification rolls back the notification of the encryption of a publication
func NotifyCMS ¶
func NotifyCMS(pub Publication, notifyURL string, verbose bool) error
NotifyCMS notifies a CMS of the encryption of a publication
func NotifyLCPServer ¶
func NotifyLCPServer(pub Publication, lcpsv string, v2 bool, username string, password string, verbose bool) error
NotifyLCPServer notifies the License Server of the encryption of a publication
func StoreS3Publication ¶
StoreS3Publication stores an encrypted file into its definitive storage. Only called for S3 buckets.
Types ¶
type CMSMsg ¶
type CMSMsg struct { UUID string `json:"uuid"` Title string `json:"title"` ContentType string `json:"content_type"` DatePublished string `json:"date_published"` Description string `json:"description"` CoverUrl string `json:"cover_url,omitempty"` Language []Coded `json:"language"` Publisher []Entity `json:"publisher"` Author []Entity `json:"author"` Category []Entity `json:"category"` }
CMSMsg is used for notifying a CMS
type LCPServerMsgV2 ¶
type LCPServerMsgV2 struct { UUID string `json:"uuid"` Title string `json:"title"` EncryptionKey []byte `json:"encryption_key"` Location string `json:"location"` ContentType string `json:"content_type"` Size uint32 `json:"size"` Checksum string `json:"checksum"` }
LCPServerMsgV2 is used for notifying an LCP Server V2
type Publication ¶
type Publication struct { UUID string Title string Date string Description string Language []string Publisher []string Author []string Subject []string CoverUrl string StorageMode int FileName string EncryptionKey []byte Location string ContentType string Size uint32 Checksum string }
Publication aggregates information during the process
func ProcessEncryption ¶
func ProcessEncryption(contentID, contentKey, inputPath, tempRepo, outputRepo, storageRepo, storageURL, storageFilename string, extractCover bool) (*Publication, error)
ProcessEncryption encrypts a publication inputPath must contain a processable file extension (EPUB, PDF, LPF or RPF)
Click to show internal directories.
Click to hide internal directories.