storage

package
v0.0.0-...-e44eb67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BattleStorage

type BattleStorage interface {
	GetBattle(int) (*models.Battle, error)
	SetBattle(*models.Battle) error
	GetAllBattles() ([]*models.Battle, error)
	DeleteBattle(int) error
}

BattleStorage has methods for accessing battles

type GuildStorage

type GuildStorage interface {
	GetGuild(int) (*models.Guild, error)
	SetGuild(*models.Guild) error
	GetAllGuilds() ([]*models.Guild, error)
}

GuildStorage has methods for accessing guilds

type PlayerStorage

type PlayerStorage interface {
	GetPlayer(int) (*models.Player, error)
	GetAllPlayers() ([]*models.Player, error)
	SetPlayer(*models.Player) error
	SetAllPlayers([]*models.Player) error
	DeletePlayer(int) error
}

PlayerStorage has methods for accessing players

type SessionStorage

type SessionStorage interface {
	Set(int64, string)
	Get(int64) string
	Reset(int64)
}

type Storage

Storage is generic storage, contains all game data access

func New

func New(filename string) Storage

New creates new boltDB storage

type SurveyStorage

type SurveyStorage interface {
	GetSurvey(string, int) (*models.Survey, error)
	SetSurvey(string, int, *models.Survey) error
}

SurveyStorage is a storage for interactive multiple-questions surveys

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL