Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Character ¶
type Character struct { Name string `json:"name" gorethink:"name"` SpriteID string `json:"spriteid" gorethink:"spriteid"` Gender string `json:"gender" gorethink:"gender"` MapID string `json:"mapid" gorethink:"mapid"` Location Position `json:"position" gorethink:"position"` OwnerID string `json:"ownerid" gorethink:"ownerid"` }
Character type
type JwtToken ¶
type JwtToken struct { Owner string `json:"owner" gorethink:"owner"` Token string `json:"token" gorethink:"token"` }
JwtToken holds jwt tokens
type Transaction ¶
type Transaction struct { ID string `json:"id" gorethink:"id"` Owner string `json:"owner" gorethink:"owner"` State string `json:"state" gorethink:"state"` Payment *paypalsdk.CreatePaymentResp `json:"payment" gorethink:"payment"` Execution *paypalsdk.ExecuteResponse `json:"execution" gorethink:"execution"` }
Transaction struct for holding transactions with database
func NewTransaction ¶
func NewTransaction(owner User, payment *paypalsdk.CreatePaymentResp) *Transaction
NewTransaction will create a new transaction in the database
func (*Transaction) Executed ¶
func (t *Transaction) Executed(response *paypalsdk.ExecuteResponse)
Executed will save a successful execution response from paypal into the transaction object
type User ¶
type User struct { Username string `json:"username" gorethink:"username"` PasswordHash string `json:"-" gorethink:"password_hash"` Email string `json:"email" gorethink:"email"` Characters []Character `json:"characters" gorethink:"characters"` LoggedIn bool `json:"logged_in" gorethink:"logged_in"` Role Role `json:"role" gorethink:"role"` CurrentToken string `json:"-" gorethink:"current_token"` CurrentClient int `json:"-" gorethink:"-"` }
User struct for holding user data
func (*User) IsAuthenticatedForRole ¶
IsAuthenticatedForRole returns true if the user is AT OR ABOVE the requested security level
Click to show internal directories.
Click to hide internal directories.