setting

package
v0.0.0-...-c17893f Latest Latest
Warning

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

Go to latest
Published: May 27, 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 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 OrmProvider

type OrmProvider struct {
	Db  *gorm.DB   `inject:""`
	Aes *gails.Aes `inject:""`
}

OrmProvider provider of gorm

func (*OrmProvider) Get

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

Get get

func (*OrmProvider) Set

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

Set set

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