Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Character ¶
type Character struct { *entities.Character `bson:",inline"` ID bson.ObjectId `bson:"_id" json:"id,omitempty"` LoginAccount string `bson:"loginAccount" json:"-"` }
Character represents a single character of a playerAccount.
type PlayerAccount ¶
type PlayerAccount struct { tokauth.Client `bson:",inline"` Login string `bson:"login" json:"login,omitempty"` Password string `bson:"password" json:"password,omitempty"` Characters []*Character `bson:"characters" json:"characters,omitempty"` }
PlayerAccount represents the account of a player.
func (*PlayerAccount) Secure ¶
func (p *PlayerAccount) Secure() *PlayerAccount
Secure returns a secured account.
func (*PlayerAccount) ValidateAndCryptPassword ¶
func (p *PlayerAccount) ValidateAndCryptPassword() (err error)
ValidateAndCryptPassword checks if the account have every fields required and crypt the password.
func (*PlayerAccount) WithRefreshToken ¶
func (p *PlayerAccount) WithRefreshToken() *PlayerAccount
WithRefreshToken returns an account with its access Token.
Click to show internal directories.
Click to hide internal directories.