Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBadSetting = errors.New("bad setting")
ErrBadSetting is the error returned if an unknown setting is accessed
var ErrCharacterNotExist = errors.New("character does not exist")
ErrCharacterNotExist is the error returned if a character does not exist
var ErrGuildNotExist = errors.New("guild does not exist")
ErrGuildNotExist is the error returned if a guild does not exist
var ErrItemNotExist = errors.New("item does not exist")
ErrItemNotExist is the error returned if an item does not exist
var ErrSkillNotExist = errors.New("skill does not exist")
ErrSkillNotExist is the error returned if a skill does not exist
var ErrTransmuteNotExist = errors.New("transmute does not exist")
ErrTransmuteNotExist is the error returned if a transmute does not exist
var ErrUserNotExist = errors.New("user does not exist")
ErrUserNotExist is the error returned if a user does not exist
Functions ¶
This section is empty.
Types ¶
type Character ¶
type Character interface { GetName() string GetNeededSkill(name string) (Skill, error) GetNeededSkills() []Skill GetNeededItem(name string) (Item, error) GetNeededItems() []Item GetNeededTransmute(name string) (Transmute, error) GetNeededTransmutes() []Transmute SetName(name string) IncrNeededSkill(name string, amt uint64) DecrNeededSkill(name string, amt uint64) IncrNeededItem(name string, amt uint64) DecrNeededItem(name string, amt uint64) IncrNeededTransmute(name string, amt uint64) DecrNeededTransmute(name string, amt uint64) }
Character is the api for managing a user's particular character
type Guild ¶
type Guild interface { GetName() string GetSettings() GuildSettings SetName(name string) SetSettings(s GuildSettings) Serialize() ([]byte, error) }
Guild is the api for managing a particular guild
type GuildAPI ¶
type GuildAPI interface {
NewTransaction(writable bool) (GuildAPITx, error)
}
GuildAPI is the api for managing guilds transactions
type GuildAPITx ¶
type GuildAPITx interface { Commit() error Rollback() error GetGuild(name string) (Guild, error) AddGuild(name string) (Guild, error) SaveGuild(guild Guild) error }
GuildAPITx is the api for managing guilds within a transaction
type GuildSettings ¶
type GuildSettings struct {
ControlSequence string
}
GuildSettings is the configuration settings set for a guild
func (*GuildSettings) GetSettingString ¶
func (s *GuildSettings) GetSettingString(name string) (string, error)
GetSettingString returns the value of the requested setting
func (*GuildSettings) PrettyString ¶
func (s *GuildSettings) PrettyString() string
PrettyString returns a multi-line string representation of the guild settings
func (*GuildSettings) SetSettingString ¶
func (s *GuildSettings) SetSettingString(name, val string) error
SetSettingString sets the value of the requested setting
type User ¶
type User interface { GetName() string GetCharacter(name string) (Character, error) GetCharacters() []Character SetName(name string) AddCharacter(name string) Character DeleteCharacter(name string) Serialize() ([]byte, error) }
User is the api for managing a particular user