gindemo

package
v0.0.0-...-d309816 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

* @Author: tj * @Date: 2022-11-07 14:08:27 * @LastEditors: tj * @LastEditTime: 2022-12-09 15:06:23 * @FilePath: \createApiMarkdown\gindemo\data.go

* @Author: tj * @Date: 2022-11-03 18:59:04 * @LastEditors: tj * @LastEditTime: 2022-12-02 10:41:46 * @FilePath: \createApiMarkdown\gindemo\doc.go

* @Author: tj * @Date: 2022-11-07 14:10:26 * @LastEditors: tj * @LastEditTime: 2022-12-02 10:41:01 * @FilePath: \createApiMarkdown\gindemo\gindemo.go

* @Author: tj * @Date: 2022-11-02 17:40:48 * @LastEditors: tj * @LastEditTime: 2022-12-15 09:50:22 * @FilePath: \createApiMarkdown\gindemo\register.go

* @Author: tj * @Date: 2022-11-03 10:30:39 * @LastEditors: tj * @LastEditTime: 2022-12-15 09:50:42 * @FilePath: \createApiMarkdown\gindemo\route.go

* @Author: tj * @Date: 2022-11-02 17:43:17 * @LastEditors: tj * @LastEditTime: 2022-12-19 11:04:04 * @FilePath: \createApiMarkdown\gindemo\route_activity.go

* @Author: tj * @Date: 2022-11-02 16:47:20 * @LastEditors: tj * @LastEditTime: 2022-12-19 11:03:51 * @FilePath: \createApiMarkdown\gindemo\route_api.go

Index

Constants

This section is empty.

Variables

View Source
var (
	HasLogin bool = false
)
View Source
var (
	// 所有路由详情
	Routes []Route
)

Functions

func AutoBindWrap

func AutoBindWrap(ctrFunc interface{}) gin.HandlerFunc

参考 https://juejin.cn/post/6844904033551908871

func GinDemo

func GinDemo()

Types

type Activity

type Activity struct {
}

func NewActivity

func NewActivity() *Activity

func (*Activity) Add

func (a *Activity) Add(req *AddActivityRequest, c *gin.Context)

func (*Activity) Close

func (a *Activity) Close(req *CloseActivityRequest, c *gin.Context)

func (*Activity) Info

func (a *Activity) Info(req *GetActivityRequest, c *gin.Context) (rsp *GetActivityResponse)

func (*Activity) List

func (a *Activity) List(req *ActivityListRequest, c *gin.Context) (rsp *ActivityListResponse)

func (*Activity) Update

func (a *Activity) Update(req *UpdateActivityRequest, c *gin.Context)

type ActivityListDetail

type ActivityListDetail struct {
	Aid       uint64 `json:"aid" validate:"required,活动id"`
	TitleName string `json:"titleName" validate:"required,活动标题"`
	StartTime string `json:"startTime" validate:"required,活动开始时间"`
	EndTime   string `json:"endTime" validate:"required,活动结束时间"`
	Status    uint8  `json:"status" validate:"required,活动状态"`
}

type ActivityListRequest

type ActivityListRequest struct {
	Details []ActivityListDetail `json:"details" validate:"required,活动详情列表"`
	Page    int                  `json:"page" validate:"required,页码"`
	Status  int                  `json:"status" validate:"required,活动状态: -1:表示查全部;1-准备;2-关闭,oneof=-1 1 2"`
}

type ActivityListResponse

type ActivityListResponse struct {
	TotalCount int64                `json:"totalCount" validate:"required,总数"`
	Details    []ActivityListDetail `json:"details" validate:"required,活动详情列表"`
	Goods      []GoodName           `json:"goods" validate:"required,商品详情列表"`
}

type AddActivityRequest

type AddActivityRequest struct {
}

type Api

type Api struct {
}

func NewApi

func NewApi() *Api

func (*Api) GetHtml

func (a *Api) GetHtml(c *gin.Context)

type CloseActivityRequest

type CloseActivityRequest struct {
}

type GetActivityRequest

type GetActivityRequest struct {
}

type GetActivityResponse

type GetActivityResponse struct {
}

type GoodName

type GoodName struct {
	Gid       uint64 `json:"gid" validate:"required,商品id"`
	GoodsName string `json:"goodsName" validate:"required,商品名称"`
}

type Result

type Result struct {
	Code int         `json:"code" validate:"required,0-成功 1-失败"`
	Data interface{} `json:"data" validate:"required"`
	Msg  string      `json:"msg" validate:"required,错误信息"`
}

type Route

type Route struct {
	Title       string
	Author      string
	Path        string
	HttpMethod  string
	Method      reflect.Value
	Request     interface{}
	SubRequest  interface{}
	Response    interface{}
	SubResponse interface{}
}

type UpdateActivityRequest

type UpdateActivityRequest struct {
}

Jump to

Keyboard shortcuts

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