db

package
v0.0.0-...-8a6644a Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CreateDomain

func CreateDomain(d *Domain) error

func DeleteDomain

func DeleteDomain(id uint) error

func DeleteDomainError

func DeleteDomainError(id uint) error

func UpdateDomain

func UpdateDomain(id uint, d *Domain) error

Types

type Domain

type Domain struct {
	ID                  uint       `gorm:"primarykey" json:"id"`
	Name                string     `json:"name" binding:"required"`
	Host                string     `gorm:"unique" json:"host" binding:"required"`
	Since               *time.Time `json:"since,omitempty"`
	End                 *time.Time `json:"end,omitempty"`
	Error               string     `json:"error,omitempty"`
	IsDisableSentNotify *bool      `json:"isDisableSentNotify"`
}

增刪domain

func ListDomain

func ListDomain() ([]*Domain, error)

Jump to

Keyboard shortcuts

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