db

package
v0.0.0-...-8c1cabf Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeAccountByAccessToken

func AuthorizeAccountByAccessToken(accessToken string) (*models.PlayerAccount, error)

AuthorizeAccountByAccessToken checks that the account is authorized and returns the account found.

func CloseCopy

func CloseCopy(seed int)

CloseCopy closes a copy of a MongoDB session.

func Copy

func Copy(seed int)

Copy a session of MongoDB.

func CreateCharacter

func CreateCharacter(account *models.PlayerAccount, character *models.Character) (*models.Character, error)

CreateCharacter creates a new character for the account.

func CreatePlayerAccount

func CreatePlayerAccount(account *models.PlayerAccount) (*models.PlayerAccount, error)

CreatePlayerAccount creates the account if it does not already exists.

func ExtendsPlayerAccountTTLByAccessToken

func ExtendsPlayerAccountTTLByAccessToken(accessToken string, newDate time.Time) error

ExtendsPlayerAccountTTLByAccessToken extends the TTL of the access data of the account associated by the access token.

func GetCharacterByIDAndAccount

func GetCharacterByIDAndAccount(login, idCharacter string) (*models.Character, error)

GetCharacterByIDAndAccount finds the character by its account login and character id.

func RefresPlayerAccount

func RefresPlayerAccount(account *models.PlayerAccount) (*models.PlayerAccount, error)

RefresPlayerAccount refreshes the token of the account.

Types

This section is empty.

Jump to

Keyboard shortcuts

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