importer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Go

func Go(ctx context.Context, dbconn, dbname, dir string) error

Types

type Item

type Item struct {
	Name    string `xml:"name,attr" json:"name" bson:"name"`
	Pickups uint   `xml:"pickups,attr" json:"pickups" bson:"pickups"`
	Time    uint   `xml:"time,attr,omitempty" json:"time,omitempty" bson:"time,omitempty"`
}

type Match

type Match struct {
	Map      string   `json:"map" bson:"map"`
	Type     string   `json:"type" bson:"type"`
	Duration uint     `json:"duration" bson:"duration"`
	Datetime string   `json:"datetime" bson:"datetime"`
	Players  []Player `json:"players" bson:"players"`
}

type Player

type Player struct {
	Name        string   `json:"name" bson:"name"`
	Score       int      `json:"score" bson:"score"`
	Kills       uint     `json:"kills" bson:"kills"`
	Deaths      uint     `json:"deaths" bson:"deaths"`
	Suicides    uint     `json:"suicides" bson:"suicides"`
	DamageGiven uint     `json:"damage_given" bson:"damage_given"`
	DamageTaken uint     `json:"damage_taken" bson:"damage_taken"`
	HealthTotal uint     `json:"health_total" bson:"health_total"`
	ArmorTotal  uint     `json:"armor_total" bson:"armor_total"`
	Weapons     []Weapon `json:"weapons" bson:"weapons"`
	Items       []Item   `json:"items" bson:"items"`
	Powerups    []Item   `json:"powerups,omitempty" bson:"powerups,omitempty"`
}

type Stat

type Stat struct {
	Name  string `xml:"name,attr"`
	Value int    `xml:"value,attr"`
}

type Weapon

type Weapon struct {
	Name  string `xml:"name,attr" json:"name" bson:"name"`
	Hits  uint   `xml:"hits,attr" json:"hits" bson:"hits"`
	Shots uint   `xml:"shots,attr" json:"shots" bson:"shots"`
	Kills uint   `xml:"kills,attr" json:"kills" bson:"kills"`
}

type XMLMatch added in v1.0.1

type XMLMatch struct {
	Map      string      `xml:"map,attr"`
	Type     string      `xml:"type,attr"`
	Duration uint        `xml:"duration,attr"`
	Datetime string      `xml:"datetime,attr"`
	Players  []XMLPlayer `xml:"player"`
}

type XMLPlayer added in v1.0.1

type XMLPlayer struct {
	Name     string   `xml:"name,attr"`
	Stats    []Stat   `xml:"stat"`
	Weapons  []Weapon `xml:"weapons>weapon"`
	Items    []Item   `xml:"items>item"`
	Powerups []Item   `xml:"powerups>item"`
}

Jump to

Keyboard shortcuts

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