mirror of
https://github.com/m5stack/StackChan.git
synced 2026-04-27 19:12:40 +00:00
server code
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package dance
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"stackChan/api/dance/v1"
|
||||
)
|
||||
|
||||
type IDanceV1 interface {
|
||||
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
||||
Delete(ctx context.Context, req *v1.DeleteReq) (res *v1.DeleteRes, err error)
|
||||
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
|
||||
GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error)
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
||||
SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"stackChan/internal/model"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/dance" method:"post" tags:"Dance" summary:"Dance create request"`
|
||||
Mac string `json:"mac" v:"required"`
|
||||
Index int `json:"index" v:"required"`
|
||||
List []model.DanceData `json:"list" v:"required"`
|
||||
}
|
||||
|
||||
type CreateRes string
|
||||
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/dance" method:"delete" tags:"Dance" summary:"Dance delete request"`
|
||||
Mac string `json:"mac" v:"required"`
|
||||
Index int `json:"index" v:"required"`
|
||||
}
|
||||
|
||||
type DeleteRes string
|
||||
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/dance" method:"put" tags:"Dance" summary:"Dance put request"`
|
||||
Mac string `json:"mac" v:"required"`
|
||||
Index int `json:"index" v:"required"`
|
||||
Data []model.DanceData `json:"list" v:"required"`
|
||||
}
|
||||
|
||||
type UpdateRes string
|
||||
|
||||
type GetListReq struct {
|
||||
g.Meta `path:"/dance" method:"get" tags:"Dance" summary:"Dance get request"`
|
||||
Mac string `json:"mac" v:"required"`
|
||||
}
|
||||
|
||||
type GetListRes map[string][]model.DanceData
|
||||
Reference in New Issue
Block a user