Documentation
¶
Overview ¶
Package domain is a separate package so that its struct definitions and constants can be imported by other projects
Index ¶
- type BDList
- type BDListBasic
- type BDListEntry
- type BDSearchResult
- type ClassCountMap
- type ETF2LBan
- type EconBanState
- type FileInfo
- type Friend
- type JSONDuration
- type JSONFloat32
- type LastSeen
- type League
- type LeagueBanMap
- type LogsTFChat
- type LogsTFClassKills
- type LogsTFEvent
- type LogsTFKillStreak
- type LogsTFMatch
- type LogsTFMatchInfo
- type LogsTFMedic
- type LogsTFPlayer
- type LogsTFPlayerAverages
- type LogsTFPlayerClass
- type LogsTFPlayerClassWeapon
- type LogsTFPlayerSummary
- type LogsTFPlayerSums
- type LogsTFRound
- type LogsTFRoundPlayer
- type LogsTFTeam
- type LogsTFTeams
- type LogsTFUberTypes
- type Map
- type Player
- type PlayerAvatarRecord
- type PlayerBanState
- type PlayerClass
- type PlayerNameRecord
- type PlayerSteamGameOwned
- type PlayerVanityRecord
- type Profile
- type RGLBan
- type RGLMatch
- type RGLPlayerTeamHistory
- type RGLSeason
- type RGLTeam
- type RGLTeamMember
- type SbBanRecord
- type SbSite
- type ServeMeRecord
- type Site
- type SteamGame
- type SteamGameOwned
- type SteamServer
- type SteamServerCounts
- type SteamServerInfo
- type TF2BDPlayer
- type TF2BDSchema
- type Team
- type TimeStamped
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BDListBasic ¶ added in v1.0.6
type BDListEntry ¶ added in v1.0.5
type BDSearchResult ¶ added in v1.0.7
type BDSearchResult struct {
ListName string `json:"list_name"`
Match TF2BDPlayer `json:"match"`
}
type ClassCountMap ¶ added in v1.2.0
type ETF2LBan ¶ added in v1.0.8
type ETF2LBan RGLBan
ETF2LBan aliases the RGLBan model which is already good, just make it more obvious what it is.
type EconBanState ¶
type EconBanState int
const ( EconBanNone EconBanState = iota EconBanProbation EconBanBanned )
type JSONDuration ¶
JSONDuration handles encoding time.Duration values into seconds.
func (JSONDuration) MarshalJSON ¶
func (d JSONDuration) MarshalJSON() ([]byte, error)
type JSONFloat32 ¶ added in v1.0.3
type JSONFloat32 struct {
Value float32
}
JSONFloat32 handles encoding float32, returning -1 for Inf values.
func (JSONFloat32) MarshalJSON ¶ added in v1.0.3
func (d JSONFloat32) MarshalJSON() ([]byte, error)
type LogsTFChat ¶ added in v1.2.0
type LogsTFClassKills ¶ added in v1.2.0
type LogsTFEvent ¶ added in v1.2.0
type LogsTFKillStreak ¶ added in v1.2.0
type LogsTFMatch ¶
type LogsTFMatch struct {
LogsTFMatchInfo
Teams LogsTFTeams `json:"teams"`
Rounds []LogsTFRound `json:"rounds"`
Players []LogsTFPlayer `json:"players"`
Medics []LogsTFMedic `json:"medics"`
Chat []LogsTFChat `json:"chat"`
Killstreaks []LogsTFKillStreak `json:"killstreaks"`
}
type LogsTFMatchInfo ¶
type LogsTFMatchInfo struct {
LogID int `json:"log_id"`
Version int `json:"version"`
Exists bool `json:"exists"`
Title string `json:"title"`
Map string `json:"map"`
Duration JSONDuration `json:"duration"`
ScoreRED int `json:"score_red"`
ScoreBLU int `json:"score_blu"`
CreatedOn time.Time `json:"created_on"`
}
type LogsTFMedic ¶
type LogsTFMedic struct {
LogID int `json:"-"`
SteamID steamid.SteamID `json:"steam_id"`
Healing int64 `json:"healing"`
HealingPerMin float64 `json:"healing_per_min"`
ChargesKritz int `json:"charges_kritz"`
ChargesQuickfix int `json:"charges_quickfix"`
ChargesMedigun int `json:"charges_medigun"`
ChargesVacc int `json:"charges_vacc"`
Drops int `json:"drops"`
AvgTimeBuild JSONDuration `json:"avg_time_build"` // v3
AvgTimeUse JSONDuration `json:"avg_time_use"` // v3
AvgTimeBeforeHealing float64 `json:"avg_time_before_healing"` // v3
NearFullDeath int `json:"near_full_death"` // v3
AvgUberLen JSONDuration `json:"avg_uber_len"` // v3
DeathAfterCharge int `json:"death_after_charge"`
MajorAdvLost int `json:"major_adv_lost"` // v3
BiggestAdvLost JSONDuration `json:"biggest_adv_lost"` // v3
Healspread map[steamid.SteamID]int `json:"healspread"`
}
type LogsTFPlayer ¶
type LogsTFPlayer struct {
LogID int `json:"-"`
SteamID steamid.SteamID `json:"steam_id"`
Team Team `json:"team"`
Name string `json:"name"`
Kills int `json:"kills"`
Assists int `json:"assists"`
Deaths int `json:"deaths"`
Damage int64 `json:"damage"`
DPM int `json:"dpm"`
KAD float64 `json:"kad"`
KD float64 `json:"kd"`
DamageTaken int `json:"damage_taken"` // v3
DTM float64 `json:"dtm"` // v3
HealthPacks int `json:"health_packs"`
HealthPacksHealing int `json:"health_packs_healing"` // v3
Backstabs int `json:"backstabs"`
Headshots int `json:"headshots"`
Airshots int `json:"airshots"`
Caps int `json:"caps"`
HealingTaken int `json:"healing_taken"` // v3
Classes []LogsTFPlayerClass `json:"classes"`
ClassKills ClassCountMap `json:"class_kills"`
ClassDeaths ClassCountMap `json:"class_deaths"`
ClassAssists ClassCountMap `json:"class_assists"`
}
type LogsTFPlayerAverages ¶
type LogsTFPlayerAverages struct {
KillsAvg JSONFloat32 `json:"kills_avg"`
AssistsAvg JSONFloat32 `json:"assists_avg"`
DeathsAvg JSONFloat32 `json:"deaths_avg"`
DamageAvg JSONFloat32 `json:"damage_avg"`
DPMAvg JSONFloat32 `json:"dpm_avg"`
KADAvg JSONFloat32 `json:"kad_avg"`
KDAvg JSONFloat32 `json:"kd_avg"`
DamageTakenAvg JSONFloat32 `json:"damage_taken_avg"`
DTMAvg JSONFloat32 `json:"dtm_avg"`
HealthPacksAvg JSONFloat32 `json:"health_packs_avg"`
BackstabsAvg JSONFloat32 `json:"backstabs_avg"`
HeadshotsAvg JSONFloat32 `json:"headshots_avg"`
AirshotsAvg JSONFloat32 `json:"airshots_avg"`
CapsAvg JSONFloat32 `json:"caps_avg"`
HealingTakenAvg JSONFloat32 `json:"healing_taken_avg"`
}
type LogsTFPlayerClass ¶
type LogsTFPlayerClass struct {
LogID int `json:"-"`
SteamID steamid.SteamID `json:"-"`
Class PlayerClass `json:"class"`
Played JSONDuration `json:"played"`
Kills int `json:"kills"`
Assists int `json:"assists"`
Deaths int `json:"deaths"`
Damage int `json:"damage"`
Weapons []LogsTFPlayerClassWeapon `json:"weapons"`
}
type LogsTFPlayerClassWeapon ¶
type LogsTFPlayerClassWeapon struct {
LogID int `json:"-"`
SteamID steamid.SteamID `json:"-"`
Class PlayerClass `json:"-"`
Weapon string `json:"weapon"`
Kills int `json:"kills"`
Damage int `json:"damage"` // v3
Shots int `json:"shots"` // v3
Hits int `json:"hits"` // v3
Accuracy int `json:"accuracy"` // v3
}
type LogsTFPlayerSummary ¶
type LogsTFPlayerSummary struct {
Logs int `json:"logs"`
LogsTFPlayerAverages
LogsTFPlayerSums
}
type LogsTFPlayerSums ¶
type LogsTFPlayerSums struct {
KillsSum int `json:"kills_sum"`
AssistsSum int `json:"assists_sum"`
DeathsSum int `json:"deaths_sum"`
DamageSum int64 `json:"damage_sum"`
DamageTakenSum int `json:"damage_taken_sum"`
HealthPacksSum int `json:"health_packs_sum"`
BackstabsSum int `json:"backstabs_sum"`
HeadshotsSum int `json:"headshots_sum"`
AirshotsSum int `json:"airshots_sum"`
CapsSum int `json:"caps_sum"`
HealingTakenSum int `json:"healing_taken_sum"`
}
type LogsTFRound ¶
type LogsTFRound struct {
LogID int `json:"-"`
Round int `json:"round"`
Length JSONDuration `json:"length"`
ScoreBLU int `json:"score_blu"`
ScoreRED int `json:"score_red"`
KillsBLU int `json:"kills_blu"`
KillsRED int `json:"kills_red"`
UbersBLU int `json:"ubers_blu"`
UbersRED int `json:"ubers_red"`
DamageBLU int `json:"damage_blu"`
DamageRED int `json:"damage_red"`
MidFight Team `json:"mid_fight,omitempty"`
Players []LogsTFRoundPlayer `json:"players"`
Events []LogsTFEvent `json:"events"`
}
type LogsTFRoundPlayer ¶ added in v1.2.0
type LogsTFTeam ¶ added in v1.2.0
type LogsTFTeams ¶ added in v1.2.0
type LogsTFTeams struct {
Red LogsTFTeam `json:"red"`
Blu LogsTFTeam `json:"blu"`
}
type LogsTFUberTypes ¶ added in v1.2.0
type Player ¶
type Player struct {
SteamID steamid.SteamID `json:"steam_id"`
CommunityVisibilityState steamweb.VisibilityState `json:"community_visibility_state"`
ProfileState steamweb.ProfileState `json:"profile_state"`
PersonaName string `json:"persona_name"`
Vanity string `json:"vanity"`
AvatarHash string `json:"avatar_hash"`
PersonaState steamweb.PersonaState `json:"persona_state"`
RealName string `json:"real_name"`
TimeCreated time.Time `json:"time_created"`
LocCountryCode string `json:"loc_country_code"`
LocStateCode string `json:"loc_state_code"`
LocCityID int `json:"loc_city_id"`
LogsTFCount int `json:"logs_tf_count"`
FriendsUpdatedOn time.Time `json:"-"`
GamesUpdatedOn time.Time `json:"-"`
TimeStamped
}
type PlayerAvatarRecord ¶
type PlayerBanState ¶ added in v1.0.3
type PlayerBanState struct {
SteamID steamid.SteamID `json:"steam_id"`
CommunityBanned bool `json:"community_banned"`
VACBanned bool `json:"vac_banned"`
NumberOfVACBans int `json:"number_of_vac_bans"`
DaysSinceLastBan int `json:"days_since_last_ban"`
NumberOfGameBans int `json:"number_of_game_bans"`
EconomyBan steamweb.EconBanState `json:"economy_ban"`
TimeStamped
}
type PlayerClass ¶
type PlayerClass string
const ( Spectator PlayerClass = "spectator" Scout PlayerClass = "scout" Soldier PlayerClass = "soldier" Pyro PlayerClass = "pyro" Demo PlayerClass = "demoman" Heavy PlayerClass = "heavyweapons" Engineer PlayerClass = "engineer" Medic PlayerClass = "medic" Sniper PlayerClass = "sniper" Spy PlayerClass = "spy" )
type PlayerNameRecord ¶
type PlayerSteamGameOwned ¶ added in v1.1.0
type PlayerSteamGameOwned struct {
SteamID steamid.SteamID `json:"steam_id"`
AppID steamid.AppID `json:"app_id"`
Name string `json:"name"`
ImgIconURL string `json:"img_icon_url"`
ImgLogoURL string `json:"img_logo_url"`
PlaytimeForeverMinutes int `json:"playtime_forever_minutes"`
PlaytimeTwoWeeks int `json:"playtime_two_weeks"`
HasCommunityVisibleStats bool `json:"has_community_visible_stats"`
TimeStamped
}
type PlayerVanityRecord ¶
type Profile ¶
type Profile struct {
Summary Player `json:"summary"`
BanState PlayerBanState `json:"ban_state"`
SourceBans []SbBanRecord `json:"source_bans"`
ServeMe *ServeMeRecord `json:"serve_me"`
LeagueBans map[League][]any `json:"league_bans"`
LogsCount int `json:"logs_count"`
BotDetector []BDSearchResult `json:"bot_detector"`
RGL []RGLPlayerTeamHistory `json:"rgl"`
Friends []Friend `json:"friends"`
}
Profile is a high level meta profile of several services.
type RGLMatch ¶ added in v1.0.8
type RGLMatch struct {
MatchID int `json:"match_id"`
SeasonID int `json:"season_id"`
SeasonName string `json:"season_name"`
DivisionName string `json:"division_name"`
DivisionID int `json:"division_id"`
RegionID int `json:"region_id"`
MatchDate time.Time `json:"match_date"`
MatchName string `json:"match_name"`
IsForfeit bool `json:"is_forfeit"`
Winner int `json:"winner"`
TeamIDA int `json:"team_ida"`
PointsA float32 `json:"points_a"`
TeamIDB int `json:"team_idb"`
PointsB float32 `json:"points_b"`
}
type RGLPlayerTeamHistory ¶ added in v1.0.8
type RGLPlayerTeamHistory struct {
DivisionName string `json:"division_name,omitempty"`
TeamLeader steamid.SteamID `json:"team_leader"`
Tag string `json:"tag,omitempty"`
TeamName string `json:"team_name,omitempty"`
FinalRank int `json:"final_rank,omitempty"`
Name string `json:"name"`
IsTeamLeader bool `json:"is_team_leader"`
JoinedAt time.Time `json:"joined_at"`
LeftAt *time.Time `json:"left_at"`
SteamID steamid.SteamID `json:"-"`
}
type RGLSeason ¶ added in v1.0.8
type RGLSeason struct {
SeasonID int `json:"season_id"`
Name string `json:"name"`
Maps []string `json:"maps"`
FormatName string `json:"format_name"`
RegionName string `json:"region_name"`
ParticipatingTeams []int `json:"participating_teams"`
Matches []int `json:"matches"`
CreatedOn time.Time `json:"created_on"`
}
type RGLTeam ¶ added in v1.0.8
type RGLTeam struct {
TeamID int `json:"team_id,omitempty"`
SeasonID int `json:"season_id,omitempty"`
DivisionID int `json:"division_id,omitempty"`
DivisionName string `json:"division_name,omitempty"`
TeamLeader steamid.SteamID `json:"team_leader"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Tag string `json:"tag,omitempty"`
TeamName string `json:"team_name,omitempty"`
FinalRank int `json:"final_rank,omitempty"`
}
type RGLTeamMember ¶ added in v1.0.8
type SbBanRecord ¶
type SbBanRecord struct {
BanID int `json:"ban_id"`
SiteName Site `json:"site_name"`
SiteID int `json:"site_id"`
PersonaName string `json:"persona_name"`
SteamID steamid.SteamID `json:"steam_id"`
Reason string `json:"reason"`
InvokedOn time.Time `json:"invoked_on"`
ExpiresOn time.Time `json:"expires_on"`
Permanent bool `json:"permanent"`
Unbanned bool `json:"unbanned"`
UnbanReason string `json:"unban_reason"`
TimeStamped
}
type SbSite ¶
type SbSite struct {
SiteID int `json:"site_id"`
Name Site `json:"name"`
TimeStamped
}
type ServeMeRecord ¶
type Site ¶
type Site string
const ( Skial Site = "skial" GFL Site = "gfl" Spaceship Site = "spaceship" UGC Site = "ugc" SirPlease Site = "sirplease" Dixigame Site = "dixigame" ScrapTF Site = "scraptf" Wonderland Site = "wonderland" LazyPurple Site = "lazypurple" FirePowered Site = "firepowered" Harpoon Site = "harpoongaming" Panda Site = "panda" NeonHeights Site = "neonheights" Loos Site = "loos" PubsTF Site = "pubstf" SGGaming Site = "sggaming" MaxDB Site = "maxdb" SvdosBrothers Site = "svdosbrothers" Electric Site = "electric" GlobalParadise Site = "globalparadise" SavageServidores Site = "savageservidores" CSIServers Site = "csiservers" FluxTF Site = "fluxtf" Blackwonder Site = "blackwonder" DarkPyro Site = "darkpyro" OpstOnline Site = "opstonline" BouncyBall Site = "bouncyball" FurryPound Site = "furrypound" RetroServers Site = "retroservers" SwapShop Site = "swapshop" ECJ Site = "ecj" JumpAcademy Site = "jumpacademy" SameTeem Site = "sameteem" DreamFire Site = "dreamfire" GunServer Site = "gunserver" Sneaks Site = "sneaks" Nide Site = "nide" AstraMania Site = "astramania" TF2Maps Site = "tf2maps" PetrolTF Site = "petroltf" LazyNeer Site = "lazyneer" TheVille Site = "theville" Oreon Site = "oreon" TriggerHappy Site = "triggerhappy" Tawerna Site = "tawerna" TitanTF Site = "titan" DiscFF Site = "discff" Otaku Site = "otaku" BaitedCommunity Site = "baitedcommunity" CedaPug Site = "cedapug" GameSites Site = "gamesites" Bierwiese Site = "bierwiese" ProGamesZet Site = "progameszet" GetSome Site = "getsome" Rushy Site = "rushy" MoeVsMachine Site = "moevsmachine" Prwh Site = "prwh" CasualFun Site = "casualfun" EOTLGaming Site = "eotlgaming" BioCrafting Site = "biocrafting" EpicZone Site = "epiczone" )
type SteamGameOwned ¶ added in v1.1.0
type SteamServer ¶ added in v1.1.0
type SteamServerCounts ¶ added in v1.1.0
type SteamServerInfo ¶ added in v1.1.0
type TF2BDPlayer ¶ added in v1.0.5
type TF2BDSchema ¶ added in v1.0.5
type TF2BDSchema struct {
Schema string `json:"$schema"` //nolint:tagliatelle
FileInfo FileInfo `json:"file_info"`
Players []TF2BDPlayer `json:"players"`
}
Click to show internal directories.
Click to hide internal directories.