Documentation
¶
Index ¶
- type LocalProvider
- func (l *LocalProvider) ClearGames() error
- func (l *LocalProvider) DeleteGame(id string) error
- func (l *LocalProvider) GetAllGames() (model.GameMap, error)
- func (l *LocalProvider) GetGame(id string) (*model.Game, error)
- func (l *LocalProvider) HasGame(id string) (bool, error)
- func (l *LocalProvider) PutGame(g *model.Game) error
- type Provider
- type RedisProvider
- func (r *RedisProvider) ClearGames() error
- func (r *RedisProvider) Connect() error
- func (r *RedisProvider) DeleteGame(id string) error
- func (r *RedisProvider) GetAllGames() (model.GameMap, error)
- func (r *RedisProvider) GetGame(id string) (*model.Game, error)
- func (r *RedisProvider) HasGame(id string) (bool, error)
- func (r *RedisProvider) PutGame(g *model.Game) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalProvider ¶
type LocalProvider struct {
// contains filtered or unexported fields
}
func NewLocalProvider ¶
func NewLocalProvider() *LocalProvider
func (*LocalProvider) ClearGames ¶
func (l *LocalProvider) ClearGames() error
func (*LocalProvider) DeleteGame ¶
func (l *LocalProvider) DeleteGame(id string) error
func (*LocalProvider) GetAllGames ¶
func (l *LocalProvider) GetAllGames() (model.GameMap, error)
type RedisProvider ¶
type RedisProvider struct {
// contains filtered or unexported fields
}
func NewRedisProvider ¶
func NewRedisProvider(addr string, pw string, db int) *RedisProvider
func (*RedisProvider) ClearGames ¶
func (r *RedisProvider) ClearGames() error
func (*RedisProvider) Connect ¶
func (r *RedisProvider) Connect() error
func (*RedisProvider) DeleteGame ¶
func (r *RedisProvider) DeleteGame(id string) error
func (*RedisProvider) GetAllGames ¶
func (r *RedisProvider) GetAllGames() (model.GameMap, error)
Click to show internal directories.
Click to hide internal directories.