Documentation ¶
Overview ¶
Package retropg is a PostgreSQL database implementation of the retro.Storer interface (https://github.com/kralamoure/retro).
Index ¶
- type Db
- func (r *Db) AllCharacters(ctx context.Context) (map[int]retro.Character, error)
- func (r *Db) AllCharactersByAccountId(ctx context.Context, accountId string) (map[int]retro.Character, error)
- func (r *Db) Character(ctx context.Context, id int) (retro.Character, error)
- func (r *Db) CharacterItem(ctx context.Context, id int) (retro.CharacterItem, error)
- func (r *Db) CharacterItemsByCharacterId(ctx context.Context, characterId int) (items map[int]retro.CharacterItem, err error)
- func (r *Db) Characters(ctx context.Context, gameServerId int) (map[int]retro.Character, error)
- func (r *Db) CharactersByAccountId(ctx context.Context, gameServerId int, accountId string) (map[int]retro.Character, error)
- func (r *Db) CharactersByGameMapId(ctx context.Context, gameServerId int, gameMapId int) (map[int]retro.Character, error)
- func (r *Db) Classes(ctx context.Context) (classes map[retrotyp.ClassId]retro.Class, err error)
- func (r *Db) CreateCharacter(ctx context.Context, character retro.Character) (id int, err error)
- func (r *Db) CreateCharacterItem(ctx context.Context, item retro.CharacterItem) (id int, err error)
- func (r *Db) CreateGameServer(ctx context.Context, gameServer retro.GameServer) error
- func (r *Db) CreateMarketItem(ctx context.Context, item retro.MarketItem) (id int, err error)
- func (r *Db) CreateMount(ctx context.Context, mount retro.Mount) (id int, err error)
- func (r *Db) CreateTicket(ctx context.Context, ticket retro.Ticket) (id string, err error)
- func (r *Db) DeleteCharacter(ctx context.Context, id int) error
- func (r *Db) DeleteCharacterItem(ctx context.Context, id int) error
- func (r *Db) DeleteMarketItem(ctx context.Context, id int) error
- func (r *Db) DeleteMount(ctx context.Context, id int) error
- func (r *Db) DeleteTickets(ctx context.Context, before time.Time) (count int, err error)
- func (r *Db) EffectTemplates(ctx context.Context) (templates map[int]retro.EffectTemplate, err error)
- func (r *Db) GameMaps(ctx context.Context) (gameMaps map[int]retro.GameMap, err error)
- func (r *Db) GameServer(ctx context.Context, id int) (gameServer retro.GameServer, err error)
- func (r *Db) GameServers(ctx context.Context) (gameServers map[int]retro.GameServer, err error)
- func (r *Db) ItemSets(ctx context.Context) (itemSets map[int]retro.ItemSet, err error)
- func (r *Db) ItemTemplates(ctx context.Context) (templates map[int]retro.ItemTemplate, err error)
- func (r *Db) MarketItem(ctx context.Context, id int) (item retro.MarketItem, err error)
- func (r *Db) MarketItems(ctx context.Context, gameServerId int) (items map[int]retro.MarketItem, err error)
- func (r *Db) MarketItemsByMarketId(ctx context.Context, marketId string) (items map[int]retro.MarketItem, err error)
- func (r *Db) Markets(ctx context.Context, gameServerId int) (markets map[string]retro.Market, err error)
- func (r *Db) Mount(ctx context.Context, id int) (retro.Mount, error)
- func (r *Db) MountTemplates(ctx context.Context) (map[int]retro.MountTemplate, error)
- func (r *Db) Mounts(ctx context.Context) (items map[int]retro.Mount, err error)
- func (r *Db) MountsByCharacterId(ctx context.Context, characterId int) (items map[int]retro.Mount, err error)
- func (r *Db) NPCDialogs(ctx context.Context) (dialogs map[int]retro.NPCDialog, err error)
- func (r *Db) NPCResponses(ctx context.Context) (responses map[int]retro.NPCResponse, err error)
- func (r *Db) NPCTemplates(ctx context.Context) (templates map[int]retro.NPCTemplate, err error)
- func (r *Db) NPCs(ctx context.Context, gameServerId int) (npcs map[string]retro.NPC, err error)
- func (r *Db) SetGameServerState(ctx context.Context, id int, state retrotyp.GameServerState) error
- func (r *Db) Spells(ctx context.Context) (spells map[int]retro.Spell, err error)
- func (r *Db) Ticket(ctx context.Context, id string) (ticket retro.Ticket, err error)
- func (r *Db) Tickets(ctx context.Context) (tickets map[string]retro.Ticket, err error)
- func (r *Db) TriggerByGameMapIdAndCellId(ctx context.Context, gameMapId, cellId int) (retro.Trigger, error)
- func (r *Db) Triggers(ctx context.Context) (map[string]retro.Trigger, error)
- func (r *Db) UpdateCharacter(ctx context.Context, character retro.Character) error
- func (r *Db) UpdateCharacterItem(ctx context.Context, item retro.CharacterItem) error
- func (r *Db) UpdateMount(ctx context.Context, mount retro.Mount) error
- func (r *Db) UseTicket(ctx context.Context, id string) (ticket retro.Ticket, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
func (*Db) AllCharacters ¶
func (*Db) AllCharactersByAccountId ¶
func (*Db) CharacterItem ¶
func (*Db) CharacterItemsByCharacterId ¶
func (*Db) Characters ¶
func (*Db) CharactersByAccountId ¶
func (*Db) CharactersByGameMapId ¶
func (*Db) CreateCharacter ¶
func (*Db) CreateCharacterItem ¶
func (*Db) CreateGameServer ¶
func (*Db) CreateMarketItem ¶
func (*Db) CreateMount ¶
func (*Db) CreateTicket ¶
func (*Db) DeleteCharacterItem ¶
func (*Db) DeleteTickets ¶
func (*Db) EffectTemplates ¶
func (*Db) GameServer ¶
func (*Db) GameServers ¶
func (*Db) ItemTemplates ¶
func (*Db) MarketItem ¶
func (*Db) MarketItems ¶
func (*Db) MarketItemsByMarketId ¶
func (*Db) MountTemplates ¶
func (*Db) MountsByCharacterId ¶
func (*Db) NPCDialogs ¶
func (*Db) NPCResponses ¶
func (*Db) NPCTemplates ¶
func (*Db) SetGameServerState ¶
func (*Db) TriggerByGameMapIdAndCellId ¶
func (*Db) UpdateCharacter ¶
func (*Db) UpdateCharacterItem ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.