dao

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelRedisLock

func DelRedisLock(key string, version int64) error

func Get

func Get(key string) (string, error)

func InsertDemoTask

func InsertDemoTask(d DemoModel) (int64, error)

func Set

func Set(key string, value interface{}) error

func SetRedisLock

func SetRedisLock(key string, ex int64) (int64, bool, error)

func UpdateOneDemoInfo

func UpdateOneDemoInfo(d *DemoModel) (int64, error)

Types

type DemoModel

type DemoModel struct {
	Id         int64     `gorm:"primaryKey"`
	Info       string    `gorm:"column:info"`
	CreateTime time.Time `gorm:"column:create_time"`
	UpdateTime time.Time `gorm:"column:update_time"`
}

func GetOneDemoInfo

func GetOneDemoInfo(id int64) (*DemoModel, error)

Jump to

Keyboard shortcuts

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