process

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParallelProcessURIWithInstructionSet

func ParallelProcessURIWithInstructionSet(cfg *iiifconfig.Config, pr Processor, instruction_set IIIFInstructionSet, u iiifuri.URI) (map[string]interface{}, error)

func TransformURIWithInstructions

func TransformURIWithInstructions(u iiifuri.URI, i IIIFInstructions, config *iiifconfig.Config, source_cache iiifcache.Cache, dest_cache iiifcache.Cache) (iiifuri.URI, iiifimage.Image, error)

Types

type IIIFInstructionSet

type IIIFInstructionSet map[Label]IIIFInstructions

func ReadInstructions

func ReadInstructions(str_instructions string) (IIIFInstructionSet, error)

func ReadInstructionsBytes

func ReadInstructionsBytes(body []byte) (IIIFInstructionSet, error)

func ReadInstructionsFromBucket

func ReadInstructionsFromBucket(ctx context.Context, bucket *blob.Bucket, fname string) (IIIFInstructionSet, error)

func ReadInstructionsReader

func ReadInstructionsReader(fh io.Reader) (IIIFInstructionSet, error)

type IIIFInstructions

type IIIFInstructions struct {
	Region   string `json:"region"`
	Size     string `json:"size"`
	Rotation string `json:"rotation"`
	Quality  string `json:"quality"`
	Format   string `json:"format"`
}

func EnsureInstructions

func EnsureInstructions(i IIIFInstructions) IIIFInstructions

type IIIFProcessor

type IIIFProcessor struct {
	Processor
	// contains filtered or unexported fields
}

func (*IIIFProcessor) ProcessURIWithInstructions

func (pr *IIIFProcessor) ProcessURIWithInstructions(u iiifuri.URI, label Label, i IIIFInstructions) (iiifuri.URI, iiifimage.Image, error)

type Label

type Label string

type Processor

type Processor interface {
	ProcessURIWithInstructions(iiifuri.URI, Label, IIIFInstructions) (iiifuri.URI, iiifimage.Image, error)
}

func NewIIIFProcessor

func NewIIIFProcessor(config *iiifconfig.Config) (Processor, error)

func NewIIIFProcessorWithCaches

func NewIIIFProcessorWithCaches(config *iiifconfig.Config, source_cache iiifcache.Cache, dest_cache iiifcache.Cache) (Processor, error)

Jump to

Keyboard shortcuts

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