fusenapi/server_api/basic.api
2023-09-15 10:35:13 +08:00

42 lines
812 B
Plaintext

syntax = "v1"
info (
title: // TODO: add title
desc: // TODO: add description
author: ""
email: ""
)
type request {}
// response 统一返回码
type response {
Code int `json:"code"`
Message string `json:"msg"`
Data interface{} `json:"data"`
}
// Auth 认证结构
type Auth {
AccessSecret string `json:"accessSecret"`
AccessExpire int64 `json:"accessExpire"`
RefreshAfter int64 `json:"refreshAfter"`
}
// File 文件
type File {
Filename string `fsfile:"filename"`
Header map[string][]string `fsfile:"header"`
Size int64 `fsfile:"size"`
Data []byte `fsfile:"data"`
}
// 统一分页
type Meta struct {
TotalCount int64 `json:"total_count"`
PageCount int64 `json:"page_count"`
CurrentPage int `json:"current_page"`
PerPage int `json:"per_page"`
}