protection

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemeLCP      = "http://readium.org/2014/01/lcp"
	SchemeAdept    = "http://ns.adobe.com/adept"
	SchemeFairPlay = "http://itunes.apple.com/ns/epub"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheme added in v0.14.0

type Scheme int
const (
	NoDRM Scheme = iota
	Generic
	LCP
	Adept
	BarnesAndNoble
	Fairplay
	Kobo
)

func IdentifyEPUBProtection added in v0.14.0

func IdentifyEPUBProtection(ctx context.Context, f fetcher.Fetcher) (Scheme, error)

IdentifyEPUBProtection inspects the well-known DRM metadata files inside an EPUB container and returns the detected protection Scheme. Returns NoDRM when no protection metadata is present.

func (Scheme) String added in v0.14.0

func (i Scheme) String() string

func (Scheme) URI added in v0.14.0

func (s Scheme) URI() string

URI returns the canonical namespace URI for the DRM scheme, suitable for populating manifest.Encryption's Scheme field. Returns the empty string for NoDRM and Generic (no recognized DRM identifier).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL