pvp

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Friendship added in v1.4.0

type Friendship struct {
	User   string `db:"user_id" json:"user"`
	Friend string `db:"friend_id" json:"friend"`
}

type PVP

type PVP struct {
	// contains filtered or unexported fields
}

func New

func New(db *dbr.Connection, logger dbr.EventReceiver) *PVP

func (*PVP) AddFriend added in v1.4.0

func (pvp *PVP) AddFriend(f Friendship) error

func (*PVP) CreateUser added in v1.3.0

func (pvp *PVP) CreateUser(user *Player) error

func (*PVP) GetFriends added in v1.4.0

func (pvp *PVP) GetFriends(user string) ([]Player, error)

func (*PVP) GetPlayer added in v1.1.0

func (pvp *PVP) GetPlayer(ID string) (*Player, error)

func (*PVP) ListPlayers

func (pvp *PVP) ListPlayers(server string) []Player

func (*PVP) RegisterUser added in v1.3.0

func (pvp *PVP) RegisterUser(user *Player) error

type Player

type Player struct {
	ID         string   `db:"id" json:"id"`
	Username   string   `db:"username" json:"username"`
	Server     string   `db:"server" json:"server,omitempty"`
	Servers    []string `json:"servers,omitempty"`
	IGN        string   `db:"ign" json:"ign"`
	FriendCode string   `db:"friendcode" json:"friendcode"`
	EggUltra   bool     `db:"egg_for_ultra" json:"egg_for_ultra"`
}

func (*Player) ToString added in v0.1.0

func (p *Player) ToString() string

Jump to

Keyboard shortcuts

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