Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type Dependencies struct {
archive.ArchiveFactory
}
type FileAsset ¶
type FileAsset struct {
// contains filtered or unexported fields
}
Represents a publication stored as a file on the local file system.
func FileWithMediaType ¶
Creates a FileAsset from a File and an optional media type, when known.
func FileWithMediaTypeHint ¶
Creates a FileAsset from a File and an optional media type hint. Providing a media type hint will improve performances when sniffing the media type.
func (*FileAsset) CreateFetcher ¶
func (a *FileAsset) CreateFetcher(dependencies Dependencies, credentials string) (fetcher.Fetcher, error)
CreateFetcher implements PublicationAsset
type PublicationAsset ¶
type PublicationAsset interface { Name() string // Name of the asset, e.g. a filename. MediaType() mediatype.MediaType // Media type of the asset. If unknown, fallback on `MediaType.Binary`. CreateFetcher(dependencies Dependencies, credentials string) (fetcher.Fetcher, error) // Creates a fetcher used to access the asset's content. }
Represents a digital medium (e.g. a file) offering access to a publication.
Click to show internal directories.
Click to hide internal directories.