imagerecognition

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBase64Decode     = errors.New("failed to base64 decode")
	ErrGenerateUniqueId = errors.New("failed to generate uniqueId")
	ErrUploadToS3       = errors.New("failed to upload to s3")
	ErrRekognition      = errors.New("failed to rekognition detectLabels")
)

Functions

This section is empty.

Types

type RequestBody

type RequestBody struct {
	Image          string `json:"image"`
	ImageExtension string `json:"imageExtension"`
}

type Response

type Response struct {
	Labels []types.Label `json:"labels"`
}

type UseCase

type UseCase struct {
	RekognitionClient infrastructure.RekognitionClient
	S3Uploader        infrastructure.S3Uploader
	UniqueIdGenerator infrastructure.UniqueIdGenerator
}

func (*UseCase) ImageRecognition

func (
	u *UseCase,
) ImageRecognition(
	ctx context.Context,
	req RequestBody,
) (*Response, error)

Jump to

Keyboard shortcuts

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