stats

package
v0.0.0-...-6fa8ed0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(r *gin.RouterGroup, service *StatsService)

Types

type CreateWaveStatsRequest

type CreateWaveStatsRequest struct {
	SessionId int `json:"session_id" binding:"required"`
	Wave      int `json:"wave"`
	Length    int `json:"wave_length"`

	CDData *models.CDGameData `json:"cd_data"`

	Players []CreateWaveStatsRequestPlayer `json:"players"`
}

type CreateWaveStatsRequestPlayer

type CreateWaveStatsRequestPlayer struct {
	UserName     string          `json:"user_name"`
	UserAuthId   string          `json:"user_auth_id"`
	UserAuthType models.AuthType `json:"user_auth_type"`

	Perk     models.Perk `json:"perk"`
	Level    int         `json:"level"`
	Prestige int         `json:"prestige"`

	IsDead bool `json:"is_dead"`

	ShotsFired int `json:"shots_fired"`
	ShotsHit   int `json:"shots_hit"`
	ShotsHS    int `json:"shots_hs"`

	Kills ZedCounter `json:"kills"`

	HuskBackpackKills int `json:"husk_b"`
	HuskRages         int `json:"husk_r"`

	DoshEarned int `json:"dosh_earned"`

	HealsGiven    int `json:"heals_given"`
	HealsReceived int `json:"heals_recv"`

	DamageDealt int `json:"damage_dealt"`
	DamageTaken int `json:"damage_taken"`

	ZedTimeCount  int     `json:"zedtime_count"`
	ZedTimeLength float32 `json:"zedtime_length"`

	RequestHealing int `json:"request_healing"`
	RequestDosh    int `json:"request_dosh"`
	RequestHelp    int `json:"request_help"`
	TauntZeds      int `json:"taunt_zeds"`
	FollowMe       int `json:"follow_me"`
	GetToTheTrader int `json:"get_to_the_trader"`
	Affirmative    int `json:"affirmative"`
	Negative       int `json:"negative"`
	ThankYou       int `json:"thank_you"`
}

type StatsService

type StatsService struct {
	// contains filtered or unexported fields
}

func NewStatsService

func NewStatsService(db *sql.DB) *StatsService

func (*StatsService) CreateWaveStats

func (s *StatsService) CreateWaveStats(req CreateWaveStatsRequest) error

func (*StatsService) Inject

func (s *StatsService) Inject(userService *users.UserService)

type ZedCounter

type ZedCounter struct {
	Cyst         int `json:"cyst"`
	AlphaClot    int `json:"alpha_clot"`
	Slasher      int `json:"slasher"`
	Stalker      int `json:"stalker"`
	Crawler      int `json:"crawler"`
	Gorefast     int `json:"gorefast"`
	Rioter       int `json:"rioter"`
	EliteCrawler int `json:"elite_crawler"`
	Gorefiend    int `json:"gorefiend"`

	Siren int `json:"siren"`
	Bloat int `json:"bloat"`
	Edar  int `json:"edar"`
	Husk  int `json:"husk"`

	Scrake int `json:"scrake"`
	FP     int `json:"fp"`
	QP     int `json:"qp"`
	Boss   int `json:"boss"`
	Custom int `json:"custom"`
}

Jump to

Keyboard shortcuts

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