controller

package
v0.0.0-...-6e9c874 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotPost error = errors.New("Only Receive Post !")
	NotGet  error = errors.New("Only Receive Get !")
	BadData error = errors.New("Bad Error !")
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(d *sql.DB) Controller

func (Controller) Add

func (con Controller) Add(ctx *server.Context) error
{
	"user_id": 123,
	"category": 2,
	"tag": 3,
	"label": 0,
	"title": "asdasd",
	"author": "asdwe",
	"date": "this is time",
	"image": "asdbakjscx",
	"text": "asd"
}

func (Controller) CreateDatabase

func (con Controller) CreateDatabase() error

func (Controller) Delete

func (con Controller) Delete(ctx *server.Context) error
{
	"aid": 10
}

func (Controller) GetAll

func (con Controller) GetAll(ctx *server.Context) error

func (Controller) GetArticleList

func (con Controller) GetArticleList(ctx *server.Context) error

func (Controller) GetDB

func (con Controller) GetDB() mysql.Database

func (Controller) GetMore

func (con Controller) GetMore(ctx *server.Context) error

func (Controller) GetNews

func (con Controller) GetNews(ctx *server.Context) error

func (Controller) GetTextById

func (con Controller) GetTextById(ctx *server.Context) error

func (Controller) Update

func (con Controller) Update(ctx *server.Context) error

Update

Jump to

Keyboard shortcuts

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