api

package
v1.3.5-0...-a02a730 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *gorm.DB
View Source
var SQLitePath = "./data/sqlite3.db"

Functions

func Create

func Create() zoox.HandlerFunc

func DBCreate

func DBCreate(dns *DNS)

func DBDelete

func DBDelete(id int)

func DBUpdate

func DBUpdate(dns *DNS)

func Delete

func Delete() zoox.HandlerFunc

func GetDB

func GetDB() *gorm.DB

func List

func List() zoox.HandlerFunc

func Update

func Update() zoox.HandlerFunc

Types

type DNS

type DNS struct {
	ID        uint           `gorm:"primarykey" json:"id"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
	// gorm.Model
	// 记录类型
	Type string `json:"type"`
	// 记录域名
	Host string `json:"host"`
	// 记录值
	Value string `json:"value"`
	//
	IsActive bool `json:"is_active"`
	// 记录备注
	Description string `json:"description"`
}

func DBAll

func DBAll() []DNS

func DBList

func DBList(page int, pageSize int) (int64, []DNS)

func DBRetrieve

func DBRetrieve(id int) *DNS

Jump to

Keyboard shortcuts

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