package
Version:
v0.0.0-...-ac59fd1
Opens a new window with list of versions in this module.
Published: Apr 14, 2020
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Log struct {
ID primitive.ObjectID `json:"id" bson:"_id"`
UserID string `json:"user" bson:"user_id"`
CameraID string `json:"camera" bson:"camera_id"`
Photo string `json:"photo" bson:"photo_name"`
LastUpdated time.Time `json:"last_updated" bson:"last_updated"`
}
type Token struct {
UserID uint
jwt.StandardClaims
}
type User struct {
ID primitive.ObjectID `json:"id" bson:"_id" `
UserID string `json:"user_id" bson:"user_id"`
Username string `json:"username" bson:"username"`
Password string `json:"-" bson:"password"`
Name string `json:"name" bson:"name" `
Phone string `json:"phone" bson:"phone" `
PhotoName string `json:"photo_name" bson:"photo" `
Role string `json:"role" bson:"role"`
Status int32 `json:"status" bson:"status"`
Token string `json:"-"`
Embeddings [][]float64 `json:"embeddings" bson:"embeddings"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
}
type UserEmbeddings struct {
UserID string `json:"user_id" bson:"user_id"`
Name string `json:"name" bson:"name"`
Embeddings [][]float64 `json:"embeddings" bson:"embeddings"`
}
type UserJSON struct {
ID uint `json:"id" gorm:"primary_key"`
Username string `json:"username" gorm:"size:100;unique_index"`
Name string `json:"name" gorm:"size:255"`
PhotoName string `json:"photo_name" gorm:"size:100"`
}
type UserRecognition struct {
UserID string `json:"user_id"`
Name string `json:"name"`
Accuracy float64 `json:"accuracy"`
Elapsed string `json:"elapsed"`
Embedding []float64 `json:"embeddings"`
PhotoEncoding string `json:"image"`
CameraID string `json:"camera_id"`
}
type UserVerify struct {
UserID int `json:"user_id"`
Embeddings [][]float64 `json:"embeddings"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.