Documentation
¶
Overview ¶
package process provides common methods for processing images and their associated files (for example processing reports).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IIIFProcessReport ¶
type IIIFProcessReport struct { // A data structure containing labels (for image sizes) mapped to their x (width) and y (height) pixel values. Dimensions IIIFProcessReportDimensions `json:"dimensions"` // A data structure containing colour palette information about an image file. Palette []IIIFProcessReportPalette `json:"palette"` // ... URIs IIIFProcessReportURIs `json:"uris"` // ... Origin string `json:"origin"` // ... OriginURI string `json:"origin_uri"` // ... OriginFingerprint string `json:"origin_fingerprint"` }
IIIFProcessReport provides a struct mapping to the reports generate by the go-iiif/go-iiif 'iiif-process' functionality. See also: https://github.com/go-iiif/go-iiif#report-files
type IIIFProcessReportDimensions ¶
IIIFProcessReportDimensions provides a data structure containing labels (for image sizes) mapped to their x (width) and y (height) pixel values.
type IIIFProcessReportPalette ¶
type IIIFProcessReportPalette struct { // The name (or label) for a colour. Name string `json:"name"` // The (6-character) hexidecimal value for a colour. Hex string `json:"hex"` // The reference (source) for a colour. Reference string `json:"reference"` }
IIIFProcessReportPalette provides a data structure containing colour palette information about an image file.
type MediaPropertiesSize ¶
type MediaPropertiesSize struct { // The filename extension for the media file. Extension string `json:"extension"` // The pixel height of the media file. Height int `json:"height"` // The pixel width of the media file. Width int `json:"width"` // The mimetype of the media file. Mimetype string `json:"mimetype"` // A secret associated with the media file (typically appended to its URI). Secret string `json:"secret"` }
type MediaPropertiesSizes defines a struct containing properties about a media file
type ProcessReportCallback ¶ added in v0.0.14
ProcessReportCallback is a custom function for processing a IIIFProcessReport
type ReportProcessor ¶
type ReportProcessor struct { // A valid gocloud.dev/blob Bucket where reports are stored. Reports *blob.Bucket // A valid gocloud.dev/blob Bucket where pending images are stored. Pending *blob.Bucket // A valid whosonfirst/go-writer Writer for publishing Who's On First feature records WriterURI string // A valid whosonfirst/go-whosonfirst-export Exporter for exporting Who's On First feature records Exporter export.Exporter // A boolean flag indicating whether to remove pending images on completin Prune bool // ... URITemplateFunc URITemplateFunc // ... Callback ProcessReportCallback }
ReportProcessor provides a struct for managing and processing reports (produced by the go-iiif/go-iiif 'iiif-process' functionality).
func (*ReportProcessor) ProcessReport ¶
func (p *ReportProcessor) ProcessReport(ctx context.Context, report_uri string) error
ProcessReport will process a single report URI.
func (*ReportProcessor) ProcessReports ¶
func (p *ReportProcessor) ProcessReports(ctx context.Context, reports ...string) error
ProcessReports will process zero or more report URIs
type URITemplateFunc ¶ added in v0.0.4
URITemplateFunc ...