sync

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: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomAchievementIDWvWRank  = -1
	CustomAchievementIDPlayTime = -2
)
View Source
const (
	AchievementIDRealmAvenger     = 283
	AchivementIDRealmAvengerIX    = 7912
	AchievementIDSupplySpend      = 306
	AchievementIDDollyEscort      = 285
	AchievementIDDollyKill        = 288
	AchievementIDObjectiveCapture = 303
	AchievementIDObjectiveDefend  = 319
	AchievementIDCampCapture      = 291
	AchievementIDCampDefend       = 310
	AchievementIDTowerCapture     = 297
	AchievementIDTowerDefend      = 322
	AchievementIDKeepCapture      = 300
	AchievementIDKeepDefend       = 316
	AchievementIDCastleCapture    = 294
	AchievementIDCastleDefend     = 313
)

Variables

View Source
var FreeToPlayWvWRankRestriction = 0

FreeToPlayWvWRankRestriction restricts the minimum required wvw rank before free to play users can verify

Functions

func Contains

func Contains(slice []string, item string) bool

Contains checks if a slice contains the given item

func IsFreeToPlay

func IsFreeToPlay(access []string) bool

IsFreeToPlay returns true if the account is a free to play account

Types

type Service

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

func NewService

func NewService(em *verify.EventEmitter) *Service

func (*Service) HandleFailedTokenInfo

func (s *Service) HandleFailedTokenInfo(token *orm.TokenInfo, acc *orm.Account, err error) error

func (*Service) SetAPIKeyByUserService

func (s *Service) SetAPIKeyByUserService(gw2API *gw2api.Session, worldPerspective *int, platformID int, platformUserID string, primary bool, apikey string, ignoreRestrictions bool) (err error, userErr error)

SetAPIKeyByUserService sets an apikey from a user of a specific service

func (*Service) Start

func (s *Service) Start()

Start starts a synchronization loop that will continuously fetch the oldest updated API key and synchronize it with the gw2 api

func (*Service) SynchronizeAPIKey

func (s *Service) SynchronizeAPIKey(tx bun.IDB, gw2API *gw2api.Session, token *orm.TokenInfo) (acc *orm.Account, err error)

func (*Service) SynchronizeNextAPIKey

func (s *Service) SynchronizeNextAPIKey(tx bun.IDB) error

func (*Service) SynchronizeUser

func (s *Service) SynchronizeUser(tx bun.IDB, gw2API *gw2api.Session, userID int64) error

Jump to

Keyboard shortcuts

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