settings

package
v0.0.0-...-52f8398 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseProvider

type DatabaseProvider struct {
	Db  *gorm.DB
	Enc *web.Encryptor
}

DatabaseProvider provider of gorm

func (*DatabaseProvider) Get

func (p *DatabaseProvider) Get(k string, v interface{}) error

Get get

func (*DatabaseProvider) Set

func (p *DatabaseProvider) Set(k string, v interface{}, f bool) error

Set set

type Model

type Model struct {
	gorm.Model

	Key  string `gorm:"not null;unique;type:VARCHAR(255)"`
	Val  []byte `gorm:"not null"`
	Flag bool   `gorm:"not null"`
}

Model Setting enyry

func (Model) TableName

func (Model) TableName() string

TableName custom table name

type Provider

type Provider interface {
	Set(string, interface{}, bool) error
	Get(string, interface{}) error
}

Provider interface of storage

Jump to

Keyboard shortcuts

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