storer

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Models = []interface{}{
	&model.User{},
}

Functions

This section is empty.

Types

type CacheStore

type CacheStore struct {
	DefaultTimeout time.Duration
	Type           uint8
	// contains filtered or unexported fields
}

CacheStore represents the cache store

func InitCacheStore

func InitCacheStore(cfg *config.ConfigCache) *CacheStore

InitCacheStore initializes the cache store

func (*CacheStore) Get

func (c *CacheStore) Get(key string) (string, error)

Get gets

func (*CacheStore) Set

func (c *CacheStore) Set(key string, data string) error

Set stores

type DB added in v0.1.1

type DB struct {
	Self *gorm.DB
	// contains filtered or unexported fields
}

func NewDB added in v0.1.1

func NewDB(cfg *config.ConfigDb) *DB

func (*DB) Close added in v0.1.1

func (d *DB) Close()

func (*DB) CreateTables added in v0.1.1

func (d *DB) CreateTables() error

creates necessary database tables

func (*DB) GetTablePrefix added in v0.1.1

func (d *DB) GetTablePrefix() string

func (*DB) Migrate added in v0.1.1

func (d *DB) Migrate() error

migrate migrates database schemas ...

func (*DB) Open added in v0.1.1

func (d *DB) Open() error

Jump to

Keyboard shortcuts

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