Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitSchema ¶
func InitSchema()
func InitUserSchema ¶
func InitUserSchema()
func ValidateUserCreds ¶
Types ¶
type DetectionModel ¶
type DetectionModel struct {
ModelVersion string `db:"model_version"`
ModelId int32 `db:"model_id"`
}
func (*DetectionModel) Insert ¶
func (dm *DetectionModel) Insert() (int, error)
type DetectionModelHistory ¶
type DetectionModelHistory struct {
RecordId int32 `db:"record_id"`
ModelId int32 `db:"model_id"` //foreign key
UploadDate time.Time `db:"upload_date"`
VideoHash string `db:"video_hash"`
Result
}
func (*DetectionModelHistory) CheckHash ¶
func (dmh *DetectionModelHistory) CheckHash() (bool, error)
func (*DetectionModelHistory) Insert ¶
func (dmh *DetectionModelHistory) Insert() (int32, error)
type QueryResult ¶
type QueryResult struct {
TotalAnalyzed int `db:"total_analyzed" json:"totalAnalyzed"`
FakePercentage float32 `db:"fake_percentage" json:"fakePercentage"`
WeeklyData any `db:"weekly_data" json:"weeklyData"`
}
func GetUserAnalytics ¶
func GetUserAnalytics(id int64) (QueryResult, error)
type User ¶
type User struct {
ID int64 `json:"id"`
Name string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
AccessLevel int16 `db:"access_level" json:"access_level"`
}
func (*User) CheckPassword ¶
func (*User) GetHistory ¶
func (usr *User) GetHistory() (UserHistoryHolder, error)
func (*User) InsertRecord ¶
type UserHistory ¶
type UserHistory struct {
ActivityID int64 `db:"activity_id"`
UserID int64 `db:"user_id"`
ActivityTimestamp time.Time `db:"activity_timestamp"`
VideoName string `db:"video_name"`
HashID int32 `db:"hash_id"`
}
func (*UserHistory) Register ¶
func (usr *UserHistory) Register() (any, error)
type UserHistoryHolder ¶
type UserHistoryHolder []VideoResultHolder
type VideoResultHolder ¶
type VideoResultHolder struct {
AID int64 `db:"activity_id"`
Name string `db:"video_name"`
VideoHash string `db:"video_hash"`
ActivityTimestamp time.Time `db:"activity_timestamp"`
ModelVersion string `db:"model_version"`
Confidence float64 `db:"confidence"`
IsFake bool `db:"is_fake"`
}
func GetVideoResult ¶
func GetVideoResult(id int64) (VideoResultHolder, error)
Click to show internal directories.
Click to hide internal directories.