service

package
v0.0.0-...-c79df1b Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PredictImage

func PredictImage(path string, id string) (ImageID string, err error)

PredictImage predict an image by specific an image path

func RemoveImageFromDB

func RemoveImageFromDB(imageID string) error

RemoveImageFromDB remove image from database with the specific id

func RemoveImageFromS3

func RemoveImageFromS3(imageID string) error

RemoveImageFromS3 remove image from S3 storage with a specific id

Types

type Image

type Image struct {
	ID        string
	Path      string
	Timestamp struct {
		Image           int64
		Age             sql.NullInt64
		Gender          sql.NullInt64
		Emotion         sql.NullInt64
		FaceRecognition sql.NullInt64
	}
}

Image is a model for sql image result

func GetImage

func GetImage(imageID string) (Image, error)

GetImage returned an image data in DB

func ListImages

func ListImages(limit uint) ([]Image, error)

ListImages list images in SPAI

Jump to

Keyboard shortcuts

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