models

package
v0.0.0-...-ae3587a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodedVector

func EncodedVector(encoding []float32) string

EncodedVector for the given encoding, used for searching and looking up faces in elastic search

Types

type FaceDoc

type FaceDoc struct {
	PostID         int    `json:"post_id"`
	X              int    `json:"x"`
	Y              int    `json:"y"`
	Width          int    `json:"width"`
	Height         int    `json:"height"`
	EncodingVector string `json:"encoding_vector"`
}

FaceDoc is the type that is used to store a face in elasticsearch

func FaceDocFromFaceData

func FaceDocFromFaceData(faceData *models.FaceData) (*FaceDoc, error)

FaceDocFromFaceData returns a FaceDoc with an encoded `EncodingVector` given a faceData model

type InstaComment

type InstaComment struct {
	ID      int    `json:"id"`
	PostID  int    `json:"post_id"`
	Comment string `json:"comment_text"`
}

type InstaPost

type InstaPost struct {
	ID      int    `json:"id"`
	UserID  int    `json:"user_id"`
	Caption string `json:"caption"`
}

type InstaUser

type InstaUser struct {
	ID       int    `json:"id"`
	Username string `json:"user_name"`
	Realname string `json:"real_name"`
	Bio      string `json:"bio"`
}

Jump to

Keyboard shortcuts

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