Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrIDType = errors.New("invalid sid type") ErrReadInput = errors.New("error while reading input") ErrWrite = errors.New("failed to write to output file") ErrFlush = errors.New("failed to flush contents") )
var ( ErrParsePlayers = errors.New("failed to parse players") ErrParseEdict = errors.New("failed to parse edicts") ErrParseEdictTotal = errors.New("failed to parse total edicts") ErrParseUserID = errors.New("failed to parse user id") ErrParsePing = errors.New("failed to parse ping") ErrParseLoss = errors.New("failed to parse loss") ErrParseSeconds = errors.New("failed to parse seconds") ErrParseDuration = errors.New("failed to parse duration") ErrParseIP = errors.New("failed to parse ip") ErrParsePort = errors.New("failed to parse port") )
Functions ¶
func ParseReader ¶
ParseReader attempt to find all types of steam ids in the data stream provided by the input reader. It will write the output of what it finds to the output writer applying the formatting strings to each value. The formatting string takes the same formatting as the standards fmt.SprintF() and expects one %s token.
A formatting example to place each steam id on a newline: "%s\n"
idType specifies what output id format to use when writing: steam, steam3, steam32, steam64 are the valid choices.
func SIDSFromStatus ¶
SIDSFromStatus will parse the output of the console command `status` and return a set of SID64s representing all the players.
Types ¶
type Player ¶
type Player struct { UserID int Name string SID steamid.SteamID ConnectedTime time.Duration Ping int Loss int State string IP net.IP Port int }
Player represents all the available data for a player in a `status` output table.