progression

package
v0.0.0-...-bd0fe52 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasetsReturn

type DatasetsReturn struct {
	Data []PointReturn `json:"data"`
}

DatasetsReturn main type returned containing all the datasets

type PointReturn

type PointReturn struct {
	X int64   `json:"x"`
	Y float64 `json:"y"`
}

PointReturn one point for a dataset

type TimeFrame

type TimeFrame byte

TimeFrame type for different timeframe

const (
	UnknownTimeStamp TimeFrame = iota
	DailyTimeStamp
	WeeklyTimeStamp
	MonthlyTimeStamp
	YearlyTimeStamp
)

all differents TimeFrame

func (TimeFrame) GetUnixTimeFrame

func (tf TimeFrame) GetUnixTimeFrame(date *time.Time) int64

GetUnixTimeFrame return the unix time of the timeframe

func (TimeFrame) String

func (tf TimeFrame) String() string

String covnert to timeframe to string

type WeaponsPattern

type WeaponsPattern []model.Demo

WeaponsPattern type of stats for demos

func (WeaponsPattern) GetProgression

func (wp WeaponsPattern) GetProgression(
	weaponsStatsTimeFramesReturn []*WeaponsStatsTimeFrameReturn,
	steamID string,
) error

GetProgression returns the progression of the demos

type WeaponsStatsReturn

type WeaponsStatsReturn struct {
	WeaponType  common.EquipmentType  `json:"weaponType"`
	WeaponClass common.EquipmentClass `json:"weaponClass"`
	WeaponName  string                `json:"weaponName"`

	FirstBulletAccuracy DatasetsReturn `json:"firstBulletAccuracy"`
	FirstBulletHS       DatasetsReturn `json:"firstBulletHS"`
	BulletAccuracy      DatasetsReturn `json:"bulletAccuracy"`
	HSPercentage        DatasetsReturn `json:"hSPercentage"`
	NbrBulletsFired     DatasetsReturn `json:"nbrBulletsFired"`

	AverageVelocityAttacker DatasetsReturn `json:"averageVelocityAttacker"`

	NbrBulletFired int `json:"-"`
	NbrBulletHit   int `json:"-"`
	NbrBulletHS    int `json:"-"`

	NbrFirstBulletFired int `json:"-"`
	NbrFirstBulletHit   int `json:"-"`
	NbrFirstBulletHS    int `json:"-"`

	CumulativeVelocityAttacker float64 `json:"-"`
	NbrGame                    int     `json:"-"`
}

WeaponsStatsReturn stats for a weapon

type WeaponsStatsTimeFrameReturn

type WeaponsStatsTimeFrameReturn struct {
	TimeFrame          TimeFrame                                    `json:"-"`
	TimeFrameStr       string                                       `json:"timeFrame"`
	Index              int                                          `json:"index"`
	WeaponStats        WeaponsStatsReturn                           `json:"weaponStats"`
	WeaponTypeStats    map[common.EquipmentType]*WeaponsStatsReturn `json:"weaponTypeStats"`
	WeaponstatsPerSide map[int]*WeaponsStatsReturn                  `json:"weaponstatsPerSide"`
	// contains filtered or unexported fields
}

WeaponsStatsTimeFrameReturn type of stats for weapon

Jump to

Keyboard shortcuts

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