orm

package
v0.0.0-...-f65b48a Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2017 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 {
	ID        uint      `gorm:"primary_key"`
	Key       string    `gorm:"not null;unique_index;type:VARCHAR(255)"`
	Val       []byte    `gorm:"not null"`
	Encode    bool      `gorm:"not null"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Model model

func (Model) TableName

func (Model) TableName() string

TableName table name

type Store

type Store struct {
	Db *gorm.DB `inject:""`
}

Store gorm store

func (*Store) Get

func (p *Store) Get(key string) ([]byte, bool, error)

Get get

func (*Store) Set

func (p *Store) Set(key string, val []byte, enc bool) error

Set save

Jump to

Keyboard shortcuts

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