compliance

package
v5.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause Imports: 7 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() *ComplianceSpec
}

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 ComplianceSpec

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

func NewLevel0ComplianceSpec

func NewLevel0ComplianceSpec() (*ComplianceSpec, error)

func NewLevel0ComplianceSpecWithConfig

func NewLevel0ComplianceSpecWithConfig(config *iiifconfig.Config) (*ComplianceSpec, error)

func NewLevel2ComplianceSpec

func NewLevel2ComplianceSpec() (*ComplianceSpec, error)

func NewLevel2ComplianceSpecWithConfig

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

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 Level0Compliance

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

func NewLevel0Compliance

func NewLevel0Compliance(config *iiifconfig.Config) (*Level0Compliance, error)

func (*Level0Compliance) DefaultQuality

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

func (*Level0Compliance) Formats

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

func (*Level0Compliance) IsValidImageFormat

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

func (*Level0Compliance) IsValidImageQuality

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

func (*Level0Compliance) IsValidImageRegion

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

func (*Level0Compliance) IsValidImageRotation

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

func (*Level0Compliance) IsValidImageSize

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

func (*Level0Compliance) Qualities

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

func (*Level0Compliance) Spec

func (c *Level0Compliance) Spec() *ComplianceSpec

func (*Level0Compliance) Supports

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

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 (c *Level2Compliance) Spec() *ComplianceSpec

func (*Level2Compliance) Supports

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

Jump to

Keyboard shortcuts

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