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,15 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package file
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"stackChan/api/file/v1"
|
||||
)
|
||||
|
||||
type IFileV1 interface {
|
||||
File(ctx context.Context, req *v1.FileReq) (res *v1.FileRes, err error)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
||||
SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type FileReq struct {
|
||||
g.Meta `path:"/uploadFile" method:"post" tags:"File" summary:"File upload request"`
|
||||
File *ghttp.UploadFile `json:"file" v:"required" description:"File upload request"`
|
||||
Name string `json:"name" v:"required" description:"File Name"`
|
||||
Directory string `json:"directory" description:"Directory upload request"`
|
||||
}
|
||||
|
||||
type FileRes struct {
|
||||
Path string `json:"path" description:"file path"`
|
||||
}
|
||||
Reference in New Issue
Block a user