source

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobSource

type BlobSource struct {
	Source
	// contains filtered or unexported fields
}

func (*BlobSource) Read

func (bs *BlobSource) Read(uri string) ([]byte, error)

type FlickrSource

type FlickrSource struct {
	Source
	// contains filtered or unexported fields
}

func NewFlickrSource

func NewFlickrSource(config *iiifconfig.Config) (*FlickrSource, error)

func (*FlickrSource) GetSource

func (fs *FlickrSource) GetSource(id string) (string, error)

func (*FlickrSource) Read

func (fs *FlickrSource) Read(id string) ([]byte, error)

type MemorySource

type MemorySource struct {
	Source
	// contains filtered or unexported fields
}

func (*MemorySource) Read

func (bs *MemorySource) Read(uri string) ([]byte, error)

type PhotoRsp

type PhotoRsp struct {
	Sizes PhotoSizes `json:"sizes"`
}

type PhotoSize

type PhotoSize struct {
	Label string `json:"label"`
	// it turns out these get returned as both strings and ints and
	// that makes Go sad but we don't really care either way so...
	// (20160920/thisisaaronland)
	// Width  int    `json:"width"`
	// Height int    `json:"height"`
	Source string `json:"source"`
	Url    string `json:"url"`
	Media  string `json:"media"`
}

type PhotoSizes

type PhotoSizes struct {
	CanBlog     int         `json:"canblog"`
	CanPrint    int         `json:"canprint"`
	CanDownload int         `json:"candownload"`
	Size        []PhotoSize `json:"size"`
}

type Source

type Source interface {
	Read(uri string) ([]byte, error)
}

func NewBlobSource

func NewBlobSource(config *iiifconfig.Config) (Source, error)

func NewBlobSourceFromURI

func NewBlobSourceFromURI(uri string) (Source, error)

func NewDiskSource

func NewDiskSource(config *iiifconfig.Config) (Source, error)

func NewMemorySource

func NewMemorySource(body []byte) (Source, error)

func NewS3Source

func NewS3Source(cfg *iiifconfig.Config) (Source, error)

func NewSourceFromConfig

func NewSourceFromConfig(config *iiifconfig.Config) (Source, error)

type URISource

type URISource struct {
	Source
	// contains filtered or unexported fields
}

func NewURISource

func NewURISource(config *iiifconfig.Config) (*URISource, error)

func (*URISource) Read

func (us *URISource) Read(id string) ([]byte, error)

Jump to

Keyboard shortcuts

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