compliance

package
v0.0.0-...-e3fa223 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compliance

type Compliance interface {
	Formats() []string
	Qualities() []string
	DefaultQuality() (string, error)
	IsValidImageRegion(string) (bool, error)
	IsValidImageSize(string) (bool, error)
	IsValidImageRotation(string) (bool, error)
	IsValidImageQuality(string) (bool, error)
	IsValidImageFormat(string) (bool, error)
	Spec() *Level2ComplianceSpec
}

type ComplianceDetails

type ComplianceDetails struct {
	Name      string `json:"name"`
	Syntax    string `json:"syntax"`
	Required  bool   `json:"required"`
	Supported bool   `json:"supported"`
	Match     string `json:"match,omitempty"`
	Default   bool   `json:"default,omitempty"`
}

type HTTPCompliance

type HTTPCompliance map[string]HTTPComplianceDetails

type HTTPComplianceDetails

type HTTPComplianceDetails struct {
	Name      string `json:"name"`
	Required  bool   `json:"required"`
	Supported bool   `json:"supported"`
}

type ImageCompliance

type ImageCompliance struct {
	Region   map[string]ComplianceDetails `json:"region"`
	Size     map[string]ComplianceDetails `json:"size"`
	Rotation map[string]ComplianceDetails `json:"rotation"`
	Quality  map[string]ComplianceDetails `json:"quality"`
	Format   map[string]ComplianceDetails `json:"format"`
}

type Level2Compliance

type Level2Compliance struct {
	Compliance
	// contains filtered or unexported fields
}

func NewLevel2Compliance

func NewLevel2Compliance(config *iiifconfig.Config) (*Level2Compliance, error)

func (*Level2Compliance) DefaultQuality

func (c *Level2Compliance) DefaultQuality() (string, error)

func (*Level2Compliance) Formats

func (c *Level2Compliance) Formats() []string

func (*Level2Compliance) IsValidImageFormat

func (c *Level2Compliance) IsValidImageFormat(format string) (bool, error)

func (*Level2Compliance) IsValidImageQuality

func (c *Level2Compliance) IsValidImageQuality(quality string) (bool, error)

func (*Level2Compliance) IsValidImageRegion

func (c *Level2Compliance) IsValidImageRegion(region string) (bool, error)

func (*Level2Compliance) IsValidImageRotation

func (c *Level2Compliance) IsValidImageRotation(rotation string) (bool, error)

func (*Level2Compliance) IsValidImageSize

func (c *Level2Compliance) IsValidImageSize(size string) (bool, error)

func (*Level2Compliance) Qualities

func (c *Level2Compliance) Qualities() []string

func (*Level2Compliance) Spec

func (*Level2Compliance) Supports

func (c *Level2Compliance) Supports() []string

type Level2ComplianceSpec

type Level2ComplianceSpec struct {
	Image ImageCompliance `json:"image"`
	HTTP  HTTPCompliance  `json:"http"`
}

func NewLevel2ComplianceSpec

func NewLevel2ComplianceSpec() (*Level2ComplianceSpec, error)

func NewLevel2ComplianceSpecWithConfig

func NewLevel2ComplianceSpecWithConfig(config *iiifconfig.Config) (*Level2ComplianceSpec, error)

Jump to

Keyboard shortcuts

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