types

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

View Source
const (
	ChatSourceRust    = "rust"
	ChatSourceDiscord = "discord"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	BaseAccount `bson:",inline" json:",inline"`
	Servers     []Server
	Timestamp   `bson:",inline" json:",inline"`
}

type Ack

type Ack func(bool)

type BaseAccount

type BaseAccount struct {
	GuildSnowflake string
	OwnerSnowflake string
}

type BaseUser

type BaseUser struct {
	SteamInfo   `bson:",inline" json:",inline"`
	DiscordInfo `bson:",inline" json:",inline"`
	DisplayName string
}

BaseUser core user information for upserts

type ChatMessage

type ChatMessage struct {
	SteamInfo   `bson:",inline" json:",inline"`
	DiscordInfo `bson:",inline" json:"-"`
	ServerKey   string `json:"-"`
	ClanTag     string
	DisplayName string
	Message     string
	Source      string
	ChannelID   string `json:"-"`
	Timestamp   `bson:",inline" json:",inline"`
}

type Clan

type Clan struct {
	Tag         string
	OwnerID     uint64
	Description string
	Members     []uint64
	Moderators  []uint64
	Invited     []uint64
}

func ClanFromServerClan

func ClanFromServerClan(sc ServerClan) (*Clan, error)

ClanFromServerClan Converts strings to uints

type DiscordAuth

type DiscordAuth struct {
	BaseUser   `bson:",inline"`
	Pin        int
	SentToUser bool
	Ack        Ack `bson:"-" json:"-"`
}

type DiscordInfo

type DiscordInfo struct {
	DiscordName string
	Snowflake   string
}

type EntityDeath

type EntityDeath struct {
	ServerKey string
	Name      string
	GridPos   string
	Owners    []uint64
	Timestamp `bson:",inline" json:",inline"`
}

type RESTError

type RESTError struct {
	StatusCode int
	Error      string
}

RESTError Generic REST error response

type RaidAlert

type RaidAlert struct {
	SteamInfo     `bson:",inline"`
	ServerName    string
	GridPositions []string
	Items         map[string]int
	AlertAt       time.Time
}

func (RaidAlert) String

func (rn RaidAlert) String() string

type RaidInventory

type RaidInventory struct {
	Name  string
	Count int
}

type Server

type Server struct {
	Key           string
	Address       string
	Clans         []Clan
	TwitterChanID string
	ChatChanID    string
	ServerChanID  string
	RaidDelay     string
}

type ServerClan

type ServerClan struct {
	Tag         string
	Owner       string
	Description string
	Members     []string
	Moderators  []string
	Invited     []string
}

A ServerClan is a clan a Rust server sends

type SteamInfo

type SteamInfo struct {
	SteamID uint64
}

SteamInfo steam id translater between server and DB also used as a selector on the DB

type Timestamp

type Timestamp struct {
	CreatedAt time.Time
}

type User

type User struct {
	BaseUser  `bson:",inline" json:",inline"`
	Timestamp `bson:",inline" json:",inline"`
}

User full user model

Jump to

Keyboard shortcuts

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