Documentation ¶
Index ¶
- func GetAccountByName(name string) (Account, CastroAccount, error)
- type Account
- type Article
- type CastroAccount
- type CsrfToken
- type Guild
- type Map
- type Player
- func (p *Player) GetBalance() (int, error)
- func (p *Player) GetCapacity() (int, error)
- func (p *Player) GetExperience() (int, error)
- func (p *Player) GetPremiumDays() (int, error)
- func (p *Player) GetPremiumEndsAt() (int, error)
- func (p *Player) GetPremiumTime() (int, error)
- func (p *Player) GetStorageValue(key int) (*Storage, error)
- func (p *Player) IsOnline() (bool, error)
- func (p *Player) SetBalance(balance int) error
- func (p *Player) SetStorageValue(key, value int) error
- type PlayerColumn
- type Storage
- type TemplateHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccountByName ¶
func GetAccountByName(name string) (Account, CastroAccount, error)
GetAccountByName gets an account and its castro account by the account name
Types ¶
type Account ¶
type Account struct { ID int64 Name string Premium_ends_at int64 Password string Email string Creation int64 Secret sql.NullString }
Account struct used for tfs accounts
type Article ¶
type Article struct { ID int64 Title string Text string `gorm:"type:text"` CreatedAt time.Time UpdatedAt time.Time }
Article struct used to represent castro latest news
type CastroAccount ¶
CastroAccount struct used for castro custom accounts
type Guild ¶
func GetGuildByID ¶
GetGuildByID retrieves a guild by its identifier
func GetGuildByName ¶
GetGuildByName retrieves a guild by its name
func GetGuildByPlayerID ¶
GetGuildByPlayerID retrieves a player guild
type Map ¶
type Map struct { ID uint64 Name string Data []byte Created_at time.Time Updated_at time.Time Last_modtime time.Time }
Map struct used for the castro encoded map
type Player ¶
type Player struct { ID int64 Name string Level int Sex int Vocation int Town_id uint32 Account_id int64 Experience int }
Player struct used for server players
func GetGuildMember ¶
GetGuildMember retrieves the given guild member
func GetGuildMembers ¶
GetGuildMembers retrieves all guild members
func GetPlayerByID ¶
GetPlayerByID returns a player by the identifier
func GetPlayerByName ¶
GetPlayerByName returns a player by the name
func (*Player) GetBalance ¶
GetBalance returns the player balance
func (*Player) GetCapacity ¶
GetCapacity returns the player capacity
func (*Player) GetExperience ¶
GetExperience returns the player
func (*Player) GetPremiumDays ¶
GetPremiumDays returns the player premium days
func (*Player) GetPremiumEndsAt ¶
GetPremiumTime returns the player premium time end
func (*Player) GetPremiumTime ¶
GetPremiumTime returns the player premium time end
func (*Player) GetStorageValue ¶
GetStorageValue returns a storage value by its key
func (*Player) SetBalance ¶
SetBalance updates a player balance
func (*Player) SetStorageValue ¶
SetStorageValue sets a player storage value
type PlayerColumn ¶
type PlayerColumn struct {
Name string
}
type TemplateHook ¶
TemplateHook Struct used for template hooks
func GetTemplateHooksByName ¶
func GetTemplateHooksByName(name string) ([]TemplateHook, error)
GetTemplateHooksByName gets a list of template hooks from database based on the hook name