history

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect() error

func CollectAccount

func CollectAccount(storedAcc orm.Account, acc gw2api.Account) error

func MarkNotPlaying

func MarkNotPlaying(acc gw2api.Account)

func MarkPlaying

func MarkPlaying(acc gw2api.Account)

func UpdateAchievement added in v2.0.10

func UpdateAchievement(tx bun.IDB, accountID string, achievementID int, value int) error

UpdateAchievement updates the achievement of a user

func UpdateActivity added in v2.0.8

func UpdateActivity(tx bun.IDB, accountID string, rank int, kills int) error

UpdateActivity updates the activity of a user

Types

type Achievement added in v2.0.10

type Achievement struct {
	ID          int64     `bun:",pk"`
	AccountID   string    `json:"account_id"`
	Timestamp   time.Time `json:"timestamp"`
	Achievement int       `json:"achievement"`
	Value       int       `json:"value"`
}

func (Achievement) Equivalent added in v2.0.10

func (a Achievement) Equivalent(b Achievement) bool

Equivalent checks if two activities contain the same stats and ignores the timestamp

type Activity added in v2.0.8

type Activity struct {
	ID        int64     `bun:",pk"`
	AccountID string    `json:"account_id"`
	Timestamp time.Time `json:"timestamp"`
	Rank      int       `json:"rank"`
	Kills     int       `json:"kills"`
}

func (Activity) Equivalent added in v2.0.8

func (a Activity) Equivalent(b Activity) bool

Equivalent checks if two activities contain the same stats and ignores the timestamp

type History

type History struct {
	RID       int64 `bun:"r_id,pk,scanonly"`
	Type      HistoryType
	AccountID string
	Timestamp time.Time `bun:",scanonly"`
	Old       sql.NullString
	New       sql.NullString
}

type HistoryType

type HistoryType string
const (
	WorldMove  HistoryType = "WorldMove"
	Registered HistoryType = "Registered"
)

type Statistics

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

func NewStatistics

func NewStatistics(verification *verify.Verification) *Statistics

func (*Statistics) WorldStatistics

func (s *Statistics) WorldStatistics(platformID int, channelID string, worldPerspective int, data api.ChannelMetadata) error

type VoiceUserState

type VoiceUserState struct {
	Timestamp          time.Time
	PlatformID         int
	PlatformUserID     string
	ChannelID          string
	Muted              bool
	Deafened           bool
	WvWRank            int `json:"wvw_rank" bun:"wvw_rank"`
	Age                int
	VerificationStatus int
}

Jump to

Keyboard shortcuts

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