service

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

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

Go to latest
Published: Apr 29, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(w http.ResponseWriter, r *http.Request, id, ext, lang string, download bool, width, height int) error

Types

type CaptchaService

type CaptchaService struct{}

func (*CaptchaService) GetCaptcha

func (service *CaptchaService) GetCaptcha(c *gin.Context, length ...int)

type ProductService

type ProductService struct {
	ID            uint   `form:"id" json:"id"`
	Name          string `form:"name" json:"name"`
	CategoryID    int    `form:"category_id" json:"category_id"`
	Title         string `form:"title" json:"title" binding:"omitempty,min=2,max=100"`
	Info          string `form:"info" json:"info" binding:"max=1000"`
	ImgPath       string `form:"img_path" json:"img_path"`
	Price         string `form:"price" json:"price"`
	DiscountPrice string `form:"discount_price" json:"discount_price"`
	OnSale        bool   `form:"on_sale" json:"on_sale"`
	Num           int    `form:"num" json:"num"`
	model.BasePage
}

更新商品的服务

func (*ProductService) Create

func (service *ProductService) Create(ctx context.Context, uId uint, files []*multipart.FileHeader) serializer.Response

func (*ProductService) List

func (service *ProductService) List(ctx context.Context) serializer.Response

func (*ProductService) Search

func (service *ProductService) Search(ctx context.Context) serializer.Response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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