service

package
v4.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(ctx context.Context, scheme string, init_func ServiceInitializationFunc) error

Types

type BlurHashService

type BlurHashService struct {
	Service         `json:",omitempty"`
	BlurHashContext string `json:"@context"`
	BlurHashProfile string `json:"profile"`
	BlurHashLabel   string `json:"label"`
	BlurHash        string `json:"hash,omitempty"`
}

func (*BlurHashService) Context

func (s *BlurHashService) Context() string

func (*BlurHashService) Label

func (s *BlurHashService) Label() string

func (*BlurHashService) Profile

func (s *BlurHashService) Profile() string

func (*BlurHashService) Value

func (s *BlurHashService) Value() interface{}

type ImageHashService

type ImageHashService struct {
	Service          `json:",omitempty"`
	ImageHashContext string `json:"@context"`
	ImageHashProfile string `json:"profile"`
	ImageHashLabel   string `json:"label"`
	ImageHashAvg     string `json:"average,omitempty"`
	ImageHashDiff    string `json:"difference,omitempty"`
}

func (*ImageHashService) Context

func (s *ImageHashService) Context() string

func (*ImageHashService) Label

func (s *ImageHashService) Label() string

func (*ImageHashService) Profile

func (s *ImageHashService) Profile() string

func (*ImageHashService) Value

func (s *ImageHashService) Value() interface{}

type PaletteService

type PaletteService struct {
	Service        `json:",omitempty"`
	PaletteContext string           `json:"@context"`
	PaletteProfile string           `json:"profile"`
	PaletteLabel   string           `json:"label"`
	Palette        []colours.Colour `json:"palette,omitempty"`
}

func (*PaletteService) Context

func (s *PaletteService) Context() string

func (*PaletteService) Label

func (s *PaletteService) Label() string

func (*PaletteService) Profile

func (s *PaletteService) Profile() string

func (*PaletteService) Value

func (s *PaletteService) Value() interface{}

type Service

type Service interface {
	Context() string
	Profile() string
	Label() string
	Value() interface{}
}

func NewBlurHashService

func NewBlurHashService(cfg iiifconfig.BlurHashConfig, image iiifimage.Image) (Service, error)

func NewImageHashService

func NewImageHashService(cfg iiifconfig.ImageHashConfig, image iiifimage.Image) (Service, error)

func NewPaletteService

func NewPaletteService(cfg iiifconfig.PaletteConfig, image iiifimage.Image) (Service, error)

func NewService

func NewService(ctx context.Context, uri string, cfg *iiifconfig.Config, im iiifimage.Image) (Service, error)

type ServiceInitializationFunc

type ServiceInitializationFunc func(ctx context.Context, config *iiifconfig.Config, im iiifimage.Image) (Service, error)

Jump to

Keyboard shortcuts

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