Documentation ¶
Index ¶
- Variables
- type BulletStatsReturn
- type ChatMessageReturn
- type Controller
- func (c Controller) CheckNewDemo(ctx *gin.Context)
- func (c Controller) GetAllFromUser(ctx *gin.Context)
- func (c *Controller) GetCompetitives(ctx *gin.Context)
- func (c *Controller) GetDeathMatchs(ctx *gin.Context)
- func (c *Controller) GetHeatMaps(ctx *gin.Context)
- func (c Controller) GetLastAnalyzed(ctx *gin.Context)
- func (c *Controller) GetPatterns(ctx *gin.Context)
- func (c *Controller) GetStats(ctx *gin.Context)
- func (c Controller) Upload(ctx *gin.Context)
- func (c Controller) UploadByURL(ctx *gin.Context)
- type DemoReturn
- type FrameReturn
- type GetAllFromUserQuery
- type GetAllFromUserReturn
- type GetCompetitivesQuery
- type GetCompetitivesReturn
- type GetLastAnalyzedReturn
- type GetPatternsReturn
- type GrenadeReturn
- type HeatMapDmgReturn
- type HeatMapKillReturn
- type HeatMapReturn
- type MarksPerRoundReturn
- type MarksReturn
- type MatrixKillsReturn
- type PlayerCardReturn
- type PlayerPositionReturn
- type PlayerStatsReturn
- type RoundReturn
- type ScoreFactsReturn
- type TeamReturn
- type UploadPost
- type UploadURLGet
- type WeaponMarksReturn
Constants ¶
This section is empty.
Variables ¶
var ErrBadFileName = errors.New("bad filename")
ErrBadFileName bad filename
var ErrBadGameConVars = errors.New("bad game con vars")
ErrBadGameConVars bad game con vars
var ErrNoTokenSent = errors.New("no token sent")
ErrNoTokenSent no token sent
Functions ¶
This section is empty.
Types ¶
type BulletStatsReturn ¶
type BulletStatsReturn struct { BulletNumber int `json:"bulletNumber"` NbrBulletFired int64 `json:"nbrBulletFired"` NbrBulletHit int64 `json:"nbrBulletHit"` NbrBulletHitHS int64 `json:"nbrBulletHitHS"` NbrBulletKill int64 `json:"nbrBulletKill"` CumulativeDeltaX float64 `json:"cumulativeDeltaX"` CumulativeDeltaY float64 `json:"cumulativeDeltaY"` }
BulletStatsReturn bullet stats returned to the front
type ChatMessageReturn ¶
type ChatMessageReturn struct { Sender *string `json:"sender"` SideSender *int `json:"sideSender"` Message *string `json:"message"` IsChatAll *bool `json:"ischatAll"` }
ChatMessageReturn global struct for ChatMessage returned
type Controller ¶
type Controller struct { LoggerBack *custlogger.Logger // contains filtered or unexported fields }
Controller controller of the demos
func NewController ¶
func NewController( logBack *custlogger.Logger, c *democlassifier.DemoClassifier, di *downloaderinfo.DownloaderInfo, adm *analyzerdeathmatch.AnalyzerDeathMatch, a *analyzer.Analyzer, analyzerVersion int64, keyAPI string, ) Controller
NewController Retourne une instance du controller
func (Controller) CheckNewDemo ¶
func (c Controller) CheckNewDemo(ctx *gin.Context)
CheckNewDemo check if a new demo is available
func (Controller) GetAllFromUser ¶
func (c Controller) GetAllFromUser(ctx *gin.Context)
GetAllFromUser return all the demo of the user
func (*Controller) GetCompetitives ¶
func (c *Controller) GetCompetitives(ctx *gin.Context)
GetCompetitives return the stats of the competitives games
func (*Controller) GetDeathMatchs ¶
func (c *Controller) GetDeathMatchs(ctx *gin.Context)
GetDeathMatchs return the stats of the DM
func (*Controller) GetHeatMaps ¶
func (c *Controller) GetHeatMaps(ctx *gin.Context)
GetHeatMaps return the heatmaps of one map for a specific player
func (Controller) GetLastAnalyzed ¶
func (c Controller) GetLastAnalyzed(ctx *gin.Context)
GetLastAnalyzed return all the last demos analyzed
func (*Controller) GetPatterns ¶
func (c *Controller) GetPatterns(ctx *gin.Context)
GetPatterns return the patterns for a specific player
func (*Controller) GetStats ¶
func (c *Controller) GetStats(ctx *gin.Context)
GetStats return the stats of one game
func (Controller) UploadByURL ¶
func (c Controller) UploadByURL(ctx *gin.Context)
UploadByURL enable user to upload dedmo by url (from faceit/esea in example)
type DemoReturn ¶
type DemoReturn struct { ID *string `json:"id"` Downloaded *bool `json:"downloaded"` VersionAnalyzer *int64 `json:"versionAnalyzer"` Date *time.Time `json:"date"` MapName *string `json:"mapName"` Name *string `json:"name"` Score *[]int `json:"score"` EndState model.EndState `json:"endState"` Teams []*TeamReturn `json:"teams"` Rounds []*RoundReturn `json:"rounds"` BestMarks *MarksReturn `json:"bestMarks"` BaddestMarks *MarksReturn `json:"baddestMarks"` MatrixFlashs *HeatMapReturn `json:"matrixFlashs"` MatrixKills *HeatMapReturn `json:"matrixKills"` AverageRank *int `json:"averageRank"` }
DemoReturn global struct for demo returned
type FrameReturn ¶
type FrameReturn struct { NumFrame *int `json:"numFrame"` PlayersCard []*PlayerCardReturn `json:"playersCard"` PlayersPositions []*PlayerPositionReturn `json:"playersPositions"` Grenades []*GrenadeReturn `json:"grenades"` BombLastPosDownX *float64 `json:"bombLastPosDownX"` BombLastPosDownY *float64 `json:"bombLastPosDownY"` BombLastPosDownZ *float64 `json:"bombLastPosDownZ"` PlayerCarrierSteamID *string `json:"playerCarrierSteamID"` Timer *string `json:"timer"` BombPlanted *bool `json:"bombPlanted"` Events []byte `json:"events"` }
FrameReturn global struct for frame returned
type GetAllFromUserQuery ¶
type GetAllFromUserQuery struct { Limit int `form:"limit"` Offset int `form:"offset"` Sources *[]model.DemoSource `form:"sources[]"` Maps *[]string `form:"maps[]"` Won *bool `form:"won"` DateFrom *int64 `form:"selectedDateStart"` DateTo *int64 `form:"selectedDateEnd"` }
GetAllFromUserQuery filters for the resume of the demos
type GetAllFromUserReturn ¶
type GetAllFromUserReturn struct { Demos []DemoReturn `json:"demos"` NbrDemosToAnalyze int `json:"nbrDemosToAnalyze"` }
GetAllFromUserReturn struct returned when calling GetAllFromUser
type GetCompetitivesQuery ¶
type GetCompetitivesQuery struct { Limit int `form:"limit"` Offset int `form:"offset"` Sources *[]model.DemoSource `form:"sources[]"` Maps *[]string `form:"maps[]"` Won *bool `form:"won"` DateFrom *int64 `form:"selectedDateStart"` DateTo *int64 `form:"selectedDateEnd"` }
GetCompetitivesQuery filters for the resume of the demos
type GetCompetitivesReturn ¶
type GetCompetitivesReturn []*progression.WeaponsStatsTimeFrameReturn
GetCompetitivesReturn stats returned
type GetLastAnalyzedReturn ¶
type GetLastAnalyzedReturn struct {
Demos []DemoReturn `json:"demos"`
}
GetLastAnalyzedReturn struct returned when calling GetLastAnalyzed
type GetPatternsReturn ¶
type GetPatternsReturn struct { BulletStats []*BulletStatsReturn `json:"bulletStats"` PerfectPattern []*BulletStatsReturn `json:"perfectPattern"` MarkPattern float64 `json:"markPattern"` WeaponType string `json:"weaponType"` }
GetPatternsReturn weapon pattern returned to the front
type GrenadeReturn ¶
type GrenadeReturn struct { ID *string `json:"id"` State *int `json:"state"` PositionX *float64 `json:"positionX"` PositionY *float64 `json:"positionY"` PositionZ *float64 `json:"positionZ"` Fire *[]float64 `json:"fire"` GrenadeType *int `json:"grenadeType"` }
GrenadeReturn global struct for GrenadeReturn returned
type HeatMapDmgReturn ¶
type HeatMapDmgReturn struct { DurationSinceRoundBegan *float64 `json:"durationSinceRoundBegan"` WeaponShooter *common.EquipmentType `json:"weaponShooter"` SteamIDShooter *string `json:"steamIDShooter"` SideShooter *int `json:"sideShooter"` ShooterPosX *float64 `json:"shooterPosX"` ShooterPosY *float64 `json:"shooterPosY"` ActiveWeaponVictim *common.EquipmentType `json:"activeWeaponVictim"` SteamIDVictim *string `json:"steamIDVictim"` SideVictim *int `json:"sideVictim"` VictimPosX *float64 `json:"victimPosX"` VictimPosY *float64 `json:"victimPosY"` Dmg *int `json:"dmg"` }
HeatMapDmgReturn heat map of a shoot
type HeatMapKillReturn ¶
type HeatMapKillReturn struct { DurationSinceRoundBegan *float64 `json:"durationSinceRoundBegan"` WeaponKiller *common.EquipmentType `json:"weaponKiller"` SteamIDKiller *string `json:"steamIDKiller"` SideKiller *int `json:"sideKiller"` KillerPosX *float64 `json:"killerPosX"` KillerPosY *float64 `json:"killerPosY"` ActiveWeaponVictim *common.EquipmentType `json:"activeWeaponVictim"` SteamIDVictim *string `json:"steamIDVictim"` SideVictim *int `json:"sideVictim"` VictimPosX *float64 `json:"victimPosX"` VictimPosY *float64 `json:"victimPosY"` }
HeatMapKillReturn heat map of a kill
type HeatMapReturn ¶
type HeatMapReturn struct { Data []map[string]interface{} `json:"data"` Keys []string `json:"keys"` }
HeatMapReturn heatmap for nivo.rock
type MarksPerRoundReturn ¶
type MarksPerRoundReturn struct { SteamID *string `json:"steamID"` Side *int `json:"side"` ConstTeam *int `json:"constTeam"` Accuracy *float64 `json:"accuracy"` HS *float64 `json:"hs"` FirstBulletAccuracy *float64 `json:"firstBulletAccuracy"` FirstBulletHS *float64 `json:"firstBulletHS"` NbrBulletsFired *int `json:"nbrBulletsFired"` NbrBulletsHit *int `json:"nbrBulletsHit"` NbrBulletsHS *int `json:"nbrBulletsHS"` NbrFirstBulletsFired *int `json:"nbrFirstBulletsFired"` NbrFirstBulletsHit *int `json:"nbrFirstBulletsHit"` NbrFirstBulletsHS *int `json:"nbrFirstBulletsHS"` UtilityDamage *int `json:"utilityDamage"` Damage *int `json:"damage"` AverageVelocityShoots *int `json:"averageVelocityShoots"` AverageDeltaXCrossHair *int `json:"averageDeltaXCrossHair"` AverageDeltaYCrossHair *int `json:"averageDeltaYCrossHair"` NbrDeaths *int `json:"nbrDeaths"` NbrKills *int `json:"nbrKills"` }
MarksPerRoundReturn marks returned when requesting
type MarksReturn ¶
type MarksReturn struct { Accuracy *float64 `json:"accuracy"` HS *float64 `json:"hs"` FirstBulletAccuracy *float64 `json:"firstBulletAccuracy"` FirstBulletHS *float64 `json:"firstBulletHS"` NbrBulletsFired *int `json:"nbrBulletsFired"` NbrBulletsHit *int `json:"nbrBulletsHit"` NbrBulletsHS *int `json:"nbrBulletsHS"` NbrFirstBulletsFired *int `json:"nbrFirstBulletsFired"` NbrFirstBulletsHit *int `json:"nbrFirstBulletsHit"` NbrFirstBulletsHS *int `json:"nbrFirstBulletsHS"` UtilityDamage *int `json:"utilityDamage"` Damage *int `json:"damage"` GrenadesValueDeath *float64 `json:"grenadesValueDeath"` AverageVelocityShoots *int `json:"averageVelocityShoots"` AverageDeltaXCrossHair *int `json:"averageDeltaXCrossHair"` AverageDeltaYCrossHair *int `json:"averageDeltaYCrossHair"` NbrDeaths *int `json:"nbrDeaths"` NbrKills *int `json:"nbrKills"` WeaponsMarks []*WeaponMarksReturn `json:"weaponsMarks"` }
MarksReturn marks returned when requesting
type MatrixKillsReturn ¶
type MatrixKillsReturn struct { KilledSteamID *string `json:"killedSteamID"` KilledUsername *string `json:"killedUsername"` NbrKills *int `json:"nbrKills"` }
MatrixKillsReturn matrixKills when requesting
type PlayerCardReturn ¶
type PlayerCardReturn struct { IsAlive *bool `json:"isAlive"` IsConnected *bool `json:"isConnected"` IsControllingBot *bool `json:"isControllingBot"` Side *int `json:"side"` PrimaryWeapon *string `json:"primaryWeapon"` Pistol *string `json:"pistol"` Grenades []string `json:"grenades"` HasC4 *bool `json:"hasC4"` PlayerName *string `json:"playerName"` SteamID *string `json:"steamID"` Health *int `json:"health"` Armor *int `json:"armor"` HasHelmet *bool `json:"hasHelmet"` HasDefuseKit *bool `json:"hasDefuseKit"` Money *int `json:"money"` }
PlayerCardReturn global struct for playerCard returned
type PlayerPositionReturn ¶
type PlayerPositionReturn struct { IsAlive *bool `json:"isAlive"` NbrShoots *int `json:"nbrShoots"` IsDefusing *bool `json:"isDefusing"` IsPlanting *bool `json:"isPlanting"` Side *int `json:"side"` SteamID *string `json:"steamID"` PositionX *float64 `json:"positionX"` PositionY *float64 `json:"positionY"` PositionZ *float64 `json:"positionZ"` ViewDirectionX *float64 `json:"viewDirectionX"` }
PlayerPositionReturn global struct for playerPosition returned
type PlayerStatsReturn ¶
type PlayerStatsReturn struct { ID *uint `json:"id"` SteamID *string `json:"steamID"` ScoreFacts *ScoreFactsReturn `json:"scoreFacts"` MVPsFacts *int `json:"MVPsFacts"` Marks *MarksReturn `json:"marks"` Rank *int `json:"rank"` Username *string `json:"username"` LinkAvatar *string `json:"linkAvatar"` Color *common.Color `json:"color"` Kills *int `json:"kills"` Deaths *int `json:"deaths"` Assists *int `json:"assists"` Duels *HeatMapReturn `json:"duels"` }
PlayerStatsReturn player returned when requesting
type RoundReturn ¶
type RoundReturn struct { NumRound *int `json:"numRound"` Frames []*FrameReturn `json:"frames"` ChatMessage []*ChatMessageReturn `json:"chatMessages"` SideWin *int `json:"sideWin"` ScoreFactsPerRound []*ScoreFactsReturn `json:"scoreFactsPerRound"` MarksPerRound []*MarksPerRoundReturn `json:"marksPerRound"` HeatMapKills []*HeatMapKillReturn `json:"heatMapKills"` HeatMapDmgs []*HeatMapDmgReturn `json:"heatMapDmgs"` }
RoundReturn global struct for round returned
type ScoreFactsReturn ¶
type ScoreFactsReturn struct { NumRound *int `json:"numRound"` SteamID *string `json:"steamID"` RatioScore *float64 `json:"ratioScore"` TotalScore *float64 `json:"totalScore"` DamageScore *float64 `json:"damageScore"` KillScore *float64 `json:"killScore"` AssistKillScore *float64 `json:"assistKillScore"` DeathScore *float64 `json:"deathScore"` DropScore *float64 `json:"dropScore"` FlashScore *float64 `json:"flashScore"` RevangedScore *float64 `json:"revangedScore"` BombDefuseScore *float64 `json:"bombDefuseScore"` BombPlantedScore *float64 `json:"bombPlantedScore"` }
ScoreFactsReturn score returned when requesting
type TeamReturn ¶
type TeamReturn struct { Score *int `json:"score"` Players []*PlayerStatsReturn `json:"players"` Duels *HeatMapReturn `json:"duels"` }
TeamReturn team returned when requesting
type UploadPost ¶
type UploadPost struct {
LastModified int64 `form:"lastModified" binding:"required"`
}
UploadPost data about the demo uploaded
type UploadURLGet ¶
type UploadURLGet struct {
URL *string `json:"url" binding:"required"`
}
UploadURLGet struct to get url from payload
type WeaponMarksReturn ¶
type WeaponMarksReturn struct { Accuracy *float64 `json:"accuracy"` HS *float64 `json:"hs"` FirstBulletAccuracy *float64 `json:"firstBulletAccuracy"` FirstBulletHS *float64 `json:"firstBulletHS"` NbrBulletsFired *int `json:"nbrBulletsFired"` NbrBulletsHit *int `json:"nbrBulletsHit"` NbrBulletsHS *int `json:"nbrBulletsHS"` NbrFirstBulletsFired *int `json:"nbrFirstBulletsFired"` NbrFirstBulletsHit *int `json:"nbrFirstBulletsHit"` NbrFirstBulletsHS *int `json:"nbrFirstBulletsHS"` Damage *int `json:"damage"` AverageVelocityShoots *int `json:"averageVelocityShoots"` AverageDeltaXCrossHair *int `json:"averageDeltaXCrossHair"` AverageDeltaYCrossHair *int `json:"averageDeltaYCrossHair"` NbrDeaths *int `json:"nbrDeaths"` NbrKills *int `json:"nbrKills"` }
WeaponMarksReturn weaponMarks returned when requesting