database

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func GetAllProxies

func GetAllProxies() (proxies proxy.ProxyList)

func InitTables

func InitTables()

func SaveProxyList

func SaveProxyList(pl proxy.ProxyList)

Types

type Proxy

type Proxy struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	proxy.Base
	Link       string
	Identifier string `gorm:"unique"`
}

设置数据库字段,不使用gnorm.model中的软删除特性,和primary key与unique一起容易导致无法更新

Jump to

Keyboard shortcuts

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