db

package
v0.0.0-...-cf8e561 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//MySQL数据库指针
	Mdb *gorm.DB
)
View Source
var Rdb *redis.Client

Redis服务器客户端

View Source
var RedisCtx = context.Background()

Redis服务器上下文ctx

Functions

This section is empty.

Types

type Device

type Device struct {
	ID     int       `gorm:"int(0)"`
	Nodeid int       `gorm:"int(0)"`
	Itime  time.Time `gorm:"autoCreateTime:milli"`
}

设备表

type Node

type Node struct {
	ID   int    `gorm:"primary_key"`
	Addr string `grom:"type:varchar(511)"`
	Port int    `grom:"type:int(0)"`
}

MySQL内的数据模型 Node节点表

Jump to

Keyboard shortcuts

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