uc

package
v0.0.0-...-111a370 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JPEGMime is the content-type related to a .jpg or .jpeg picture
	JPEGMime = "image/jpeg"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ann

type Ann interface {
	GetTopK(featurizedImage []float32, k uint64) (domain.Neighbors, error)
}

Ann is an interface to manipulate approximate nearest neighbors frameworks

type Image

type Image interface {
	GetFeatures(img []byte) ([]float32, error)
}

Image is an interface to manipulate images

type Interactor

type Interactor struct {
	Image Image
	Ann   Ann
}

Interactor is a struct holding the various interfaces to use in the usecases

func NewInteractor

func NewInteractor(i Image, a Ann) Interactor

NewInteractor will create a new interactor

func (Interactor) GetSimilarImages

func (i Interactor) GetSimilarImages(fd multipart.File) (domain.Neighbors, error)

type LogicHandler

type LogicHandler interface {
	GetSimilarImages(fd multipart.File) (domain.Neighbors, error)
}

LogicHandler is the interface that must implement the struct holding the usecases

Jump to

Keyboard shortcuts

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