redis

package
v0.0.0-...-0d86c5e Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisKey                   = "i18n_translations"
	RedisDefaultLanguageKey    = "i18n_translations_default"
	RedisSupportedLanguagesKey = "i18n_translations_supported"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(addr string, password string, db int64) (*Storage, error)

func New

func New(client *redis.Client) *Storage

func (*Storage) DefaultLanguage

func (storage *Storage) DefaultLanguage() (language.Tag, error)

func (*Storage) Delete

func (storage *Storage) Delete(t *i18n.Translation) error

func (*Storage) DeleteSupportedLanguage

func (storage *Storage) DeleteSupportedLanguage(tag language.Tag) error

func (*Storage) GetAll

func (storage *Storage) GetAll() ([]*i18n.Translation, error)

func (*Storage) SetDefaultLanguage

func (storage *Storage) SetDefaultLanguage(tag language.Tag) error

func (*Storage) Store

func (storage *Storage) Store(t *i18n.Translation) error

func (*Storage) StoreSupportedLanguage

func (storage *Storage) StoreSupportedLanguage(tag language.Tag) error

func (*Storage) SupportedLanguages

func (storage *Storage) SupportedLanguages() ([]language.Tag, error)

Jump to

Keyboard shortcuts

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