website

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(c *gin.Context)

Create

func Delete

func Delete(c *gin.Context)

Delete

func Update

func Update(c *gin.Context)

Update

func WebsiteList

func WebsiteList(c *gin.Context)

WebsiteList列表

Types

type Website

type Website struct {
	Id        int       `json:"id"`
	Name      string    `json:"name"`
	Category  string    `json:"category"`
	Url       string    `json:"url"`
	Content   string    `json:"content"`
	Status    int       `json:"status"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

func (Website) TableName

func (Website) TableName() string

设置User的表名为`website`

type WebsiteService

type WebsiteService interface {
	GetWebsiteList(offset, limit int, search Website) (website []Website, count int64, err error)
	CreateWebsite(website *Website) (err error)
	UpdateWebsite(website *Website) (err error)
	DeleteWebsite(websiteID int) (err error)
}

func NewService

func NewService(mysql *gorm.DB) WebsiteService

Jump to

Keyboard shortcuts

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