interfaces

package
v0.0.0-...-535ab37 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// CacheClient interface included
	CacheClient

	// HasPreview searches preview in cache
	HasPreview(params *entities.PreviewParams) bool

	// Clean cache totally
	Clean() error
}

Cache interface

type CacheClient

type CacheClient interface {
	// Save preview to cache
	Save(preview *entities.Preview) error

	// Get preview from cache
	Get(params *entities.PreviewParams) (*entities.Preview, error)
}

CacheClient interface

type ImageLoader

type ImageLoader interface {
	// Load image from external source containing in request
	Load(request *entities.Request) ([]byte, *entities.Status)
}

ImageLoader interface

type ImageProcessor

type ImageProcessor interface {
	// Process source image with params from request and return preview response
	Process(srcImage []byte, request *entities.Request) *entities.Response
}

ImageProcessor interface

type Message

type Message interface {
	Type() int
}

Message for HTTP proxying

type Sender

type Sender interface {
	// Send response to consumer
	Send(response *entities.Response, obj interface{})
}

Sender interface

type Storage

type Storage interface {
	// Save data with hash key
	Save(hash string, data []byte) error

	// Get stored data for hash key
	Get(hash string) ([]byte, error)

	// Remove stored data by hash key
	Remove(hash string) error

	// Remove all data from storage
	Clean() error
}

Storage interface

Jump to

Keyboard shortcuts

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