Documentation ¶
Index ¶
- Variables
- type DemoDAO
- func (dao DemoDAO) Create(demo *model.Demo, log *logger.Interface) error
- func (dao DemoDAO) Delete(demo model.Demo) error
- func (dao DemoDAO) DeleteAnalyzes(demo *model.Demo) error
- func (dao DemoDAO) Exists(demo model.Demo) (bool, error)
- func (dao DemoDAO) Get(demo *model.Demo) error
- func (dao DemoDAO) GetAll2BeAnalyzed(analyzedVersion int64, gameMode model.DemoGameMode) (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllAnalizedWithStats(steamID string, sources *[]model.DemoSource, analyzerVersion int64) (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllFromUser(steamID string, sources *[]model.DemoSource, maps *[]string, from, to *int64) (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllFromUserWithMarks(steamID string, sources *[]model.DemoSource, maps *[]string, limit, offset int, ...) (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllHeatMapFromUserFromMap(steamID, mapName string, sources *[]model.DemoSource) (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllNotClassified() (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllNotDownloaded(sources *[]model.DemoSource) (demos []model.Demo, err error)
- func (dao DemoDAO) GetAllPatternsFromUser(steamID string, sources *[]model.DemoSource) (playerStats []model.PlayerStats, err error)
- func (dao DemoDAO) GetFromShareCode(sharecode string) (*model.Demo, error)
- func (dao DemoDAO) GetLastAnalyzed(versionAnalyzer int64) (demos []model.Demo, err error)
- func (dao DemoDAO) GetMarks(demo *model.Demo, steamID string) error
- func (dao DemoDAO) GetNbr2BeAnalyzedFromPlayer(steamID string, analyzedVersion int64) (nbrDemos int64, err error)
- func (dao DemoDAO) GetResumeFromFilters(steamID string, sources *[]model.DemoSource, limit, offset int, maps *[]string, ...) (demos []model.Demo, err error)
- func (dao DemoDAO) GetWithScore(demo *model.Demo, steamID string) error
- func (dao DemoDAO) GetWithStats(demo *model.Demo) error
- func (dao DemoDAO) HashExists(demo model.Demo) (bool, *model.Demo, error)
- func (dao DemoDAO) IsAnalyzed(demoID int64) (bool, error)
- func (dao DemoDAO) SaveAnalyze(demo model.Demo) error
- func (dao DemoDAO) SetDownloaded(demoID int64) error
- func (dao DemoDAO) SetGameMode(demoID int64, mode model.DemoGameMode) error
- func (dao DemoDAO) SetHash(demoID int64, hash []byte) error
- func (dao DemoDAO) SetLastVersionAnalyzer(demoID int64, analyzerVersion int64) error
- func (dao DemoDAO) SetReplayURL(demoID int64, replayURL *string) error
- func (dao DemoDAO) SetShareCode(demoID int64, sharecode *string) error
- func (dao DemoDAO) SetSource(demoID int64, source model.DemoSource) error
- func (dao DemoDAO) SwapCompetitiveToDMDemo(demo model.Demo, newPath string) error
- type DemoDeathMatchDAO
- func (dao DemoDeathMatchDAO) Create(demo *model.DeathMatchDemo) error
- func (dao DemoDeathMatchDAO) Exists(demo model.DeathMatchDemo) (bool, error)
- func (dao DemoDeathMatchDAO) Get(demo *model.DeathMatchDemo) error
- func (dao DemoDeathMatchDAO) GetAll2BeAnalyzed(analyzedVersion int64) (demos []model.DeathMatchDemo, err error)
- func (dao DemoDeathMatchDAO) GetDeathMatchFromUser(user model.User) (demos []model.DeathMatchDemo, err error)
- func (dao DemoDeathMatchDAO) SaveAnalyze(demo model.DeathMatchDemo) error
- type TokenUploadDemoDAO
- func (dao TokenUploadDemoDAO) Create(token *model.TokenUploadDemo) error
- func (dao TokenUploadDemoDAO) Exists(token model.TokenUploadDemo) (bool, error)
- func (dao TokenUploadDemoDAO) Get(token *model.TokenUploadDemo) error
- func (dao TokenUploadDemoDAO) GetAllFromUser(userID uint) ([]model.TokenUploadDemo, error)
- func (dao TokenUploadDemoDAO) UpdateUse(token *model.TokenUploadDemo) error
- type UserDAO
- func (dao UserDAO) Create(user *model.User) error
- func (dao UserDAO) Exists(user model.User) (bool, error)
- func (dao *UserDAO) Get(user *model.User) error
- func (dao UserDAO) GetAll(users *[]*model.User) error
- func (dao UserDAO) GetUserByMail(user *model.User) error
- func (dao UserDAO) GetUserFromContext(ctx *gin.Context) (*model.User, error)
- func (dao UserDAO) GetUsersWhoEnabledDownloadInfo(users *[]*model.User) error
- func (dao UserDAO) SetAPIValveWorking(user model.User, state bool) error
- func (dao *UserDAO) UpdateAccessTokenHistory(user *model.User) error
- func (dao *UserDAO) UpdateShareCode(user *model.User) error
- func (dao *UserDAO) UpdateSteamID(user *model.User) error
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyAnalyzed = errors.New("demo already analyzed")
ErrAlreadyAnalyzed demo already analyzed
var ErrNotEnoughData = errors.New("not enough data for the query")
ErrNotEnoughData not enough data for the query
Functions ¶
This section is empty.
Types ¶
type DemoDAO ¶
type DemoDAO struct {
// contains filtered or unexported fields
}
DemoDAO the doa of the demos
func NewDemoDAO ¶
func NewDemoDAO(dataSource *gorm.DB, logger *custlogger.Logger) DemoDAO
NewDemoDAO constructor for the demo DAO
func (DemoDAO) DeleteAnalyzes ¶
DeleteAnalyzes delete all analyses
func (DemoDAO) GetAll2BeAnalyzed ¶
func (dao DemoDAO) GetAll2BeAnalyzed( analyzedVersion int64, gameMode model.DemoGameMode, ) (demos []model.Demo, err error)
GetAll2BeAnalyzed get all the demos from the DB not analyzed or with an analyzer outdated
func (DemoDAO) GetAllAnalizedWithStats ¶
func (dao DemoDAO) GetAllAnalizedWithStats( steamID string, sources *[]model.DemoSource, analyzerVersion int64, ) (demos []model.Demo, err error)
GetAllAnalizedWithStats get all demos from the DB for 1 user analyzed
func (DemoDAO) GetAllFromUser ¶
func (dao DemoDAO) GetAllFromUser( steamID string, sources *[]model.DemoSource, maps *[]string, from, to *int64, ) (demos []model.Demo, err error)
GetAllFromUser get all the demo from the DB for 1 user
func (DemoDAO) GetAllFromUserWithMarks ¶
func (dao DemoDAO) GetAllFromUserWithMarks( steamID string, sources *[]model.DemoSource, maps *[]string, limit, offset int, from, to *int64, ) (demos []model.Demo, err error)
GetAllFromUserWithMarks get all the demo from the DB for 1 user with the marks
func (DemoDAO) GetAllHeatMapFromUserFromMap ¶
func (dao DemoDAO) GetAllHeatMapFromUserFromMap( steamID, mapName string, sources *[]model.DemoSource, ) (demos []model.Demo, err error)
GetAllHeatMapFromUserFromMap return all heatmaps of a player
func (DemoDAO) GetAllNotClassified ¶
GetAllNotClassified get all the demos from the DB not classifier
func (DemoDAO) GetAllNotDownloaded ¶
GetAllNotDownloaded get all the demos from the DB not downloaded
func (DemoDAO) GetAllPatternsFromUser ¶
func (dao DemoDAO) GetAllPatternsFromUser( steamID string, sources *[]model.DemoSource, ) (playerStats []model.PlayerStats, err error)
GetAllPatternsFromUser get patterns from user
func (DemoDAO) GetFromShareCode ¶
GetFromShareCode get the demo linked to the sharecode
func (DemoDAO) GetLastAnalyzed ¶
GetLastAnalyzed all the last demos analyzed
func (DemoDAO) GetNbr2BeAnalyzedFromPlayer ¶
func (dao DemoDAO) GetNbr2BeAnalyzedFromPlayer(steamID string, analyzedVersion int64) (nbrDemos int64, err error)
GetNbr2BeAnalyzedFromPlayer get the number of the demos from the DB not analyzed or with an analyzer outdated
func (DemoDAO) GetResumeFromFilters ¶
func (dao DemoDAO) GetResumeFromFilters( steamID string, sources *[]model.DemoSource, limit, offset int, maps *[]string, from, to *int64, versionAnalyzer int64, ) (demos []model.Demo, err error)
GetResumeFromFilters get all the demos by filters
func (DemoDAO) GetWithScore ¶
GetWithScore get the demo from the DB with the score of the teams
func (DemoDAO) GetWithStats ¶
GetWithStats get the demo from the DB with the stats
func (DemoDAO) HashExists ¶
HashExists return true if the hash already exists
func (DemoDAO) IsAnalyzed ¶
IsAnalyzed return true if the demo is analyzed
func (DemoDAO) SaveAnalyze ¶
SaveAnalyze saves the analyze of the demo
func (DemoDAO) SetDownloaded ¶
SetDownloaded set the demo as downloaded
func (DemoDAO) SetGameMode ¶
func (dao DemoDAO) SetGameMode(demoID int64, mode model.DemoGameMode) error
SetGameMode set the gamemode of the demo
func (DemoDAO) SetLastVersionAnalyzer ¶
SetLastVersionAnalyzer set the version analyzer of the demo with the last version
func (DemoDAO) SetReplayURL ¶
SetReplayURL set the replayURL of the demo
func (DemoDAO) SetShareCode ¶
SetShareCode set the sharecode of the demo
type DemoDeathMatchDAO ¶
type DemoDeathMatchDAO struct {
// contains filtered or unexported fields
}
DemoDeathMatchDAO the doa of the demos deathmatch
func NewDemoDeathMatchDAO ¶
func NewDemoDeathMatchDAO(dataSource *gorm.DB) DemoDeathMatchDAO
NewDemoDeathMatchDAO constructor for the demo DAO
func (DemoDeathMatchDAO) Create ¶
func (dao DemoDeathMatchDAO) Create(demo *model.DeathMatchDemo) error
Create add the demo in the DB
func (DemoDeathMatchDAO) Exists ¶
func (dao DemoDeathMatchDAO) Exists(demo model.DeathMatchDemo) (bool, error)
Exists return true if the demo already exists
func (DemoDeathMatchDAO) Get ¶
func (dao DemoDeathMatchDAO) Get(demo *model.DeathMatchDemo) error
Get get the demo from the DB
func (DemoDeathMatchDAO) GetAll2BeAnalyzed ¶
func (dao DemoDeathMatchDAO) GetAll2BeAnalyzed(analyzedVersion int64) (demos []model.DeathMatchDemo, err error)
GetAll2BeAnalyzed get all the demos from the DB not analyzed or with an analyzer outdated
func (DemoDeathMatchDAO) GetDeathMatchFromUser ¶
func (dao DemoDeathMatchDAO) GetDeathMatchFromUser(user model.User) (demos []model.DeathMatchDemo, err error)
GetDeathMatchFromUser returns death match stats from player
func (DemoDeathMatchDAO) SaveAnalyze ¶
func (dao DemoDeathMatchDAO) SaveAnalyze(demo model.DeathMatchDemo) error
SaveAnalyze saves the analyze of the demo
type TokenUploadDemoDAO ¶
type TokenUploadDemoDAO struct {
// contains filtered or unexported fields
}
TokenUploadDemoDAO the doa of the demos deathmatch
func NewTokenUploadDemoDAO ¶
func NewTokenUploadDemoDAO(dataSource *gorm.DB) TokenUploadDemoDAO
NewTokenUploadDemoDAO constructor for the demo DAO
func (TokenUploadDemoDAO) Create ¶
func (dao TokenUploadDemoDAO) Create(token *model.TokenUploadDemo) error
Create add the token in the DB
func (TokenUploadDemoDAO) Exists ¶
func (dao TokenUploadDemoDAO) Exists(token model.TokenUploadDemo) (bool, error)
Exists return true if the token exists
func (TokenUploadDemoDAO) Get ¶
func (dao TokenUploadDemoDAO) Get(token *model.TokenUploadDemo) error
Get get the token from the DB
func (TokenUploadDemoDAO) GetAllFromUser ¶
func (dao TokenUploadDemoDAO) GetAllFromUser(userID uint) ([]model.TokenUploadDemo, error)
GetAllFromUser get the tokens from the DB from an user
func (TokenUploadDemoDAO) UpdateUse ¶
func (dao TokenUploadDemoDAO) UpdateUse(token *model.TokenUploadDemo) error
UpdateUse update the fields lastUsed
type UserDAO ¶
type UserDAO struct {
// contains filtered or unexported fields
}
UserDAO the doa of the user
func NewUserDAO ¶
NewUserDAO constructor for the user DAO
func (UserDAO) GetUserByMail ¶
GetUserByMail return the user from its mail
func (UserDAO) GetUserFromContext ¶
GetUserFromContext return the user of the user's token from the DB
func (UserDAO) GetUsersWhoEnabledDownloadInfo ¶
GetUsersWhoEnabledDownloadInfo return users who gave permissions to download info
func (UserDAO) SetAPIValveWorking ¶
SetAPIValveWorking set if the data for the api is ok or not for the user
func (*UserDAO) UpdateAccessTokenHistory ¶
UpdateAccessTokenHistory update l'access token de l'utilisateur
func (*UserDAO) UpdateShareCode ¶
UpdateShareCode update le sharecode de l'utilisateur