apis

package
v0.0.0-...-88540c7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func GetHourDiffer

func GetHourDiffer(startTime, endTime string) int64

GetHourDiffer 获取相差时间

func TrackNetworkSpeed

func TrackNetworkSpeed()

Types

type File

type File struct {
	api.Api
}

func (File) UploadFile

func (e File) UploadFile(c *gin.Context)

UploadFile 上传图片 @Summary 上传图片 @Description 获取JSON @Tags 公共接口 @Accept multipart/form-data @Param type query string true "type" (1:单图,2:多图, 3:base64图片) @Param file formData file true "file" @Success 200 {string} string "{"code": 200, "message": "添加成功"}" @Success 200 {string} string "{"code": -1, "message": "添加失败"}" @Router /api/v1/public/uploadFile [post] @Security Bearer

type FileResponse

type FileResponse struct {
	Size     int64  `json:"size"`
	Path     string `json:"path"`
	FullPath string `json:"full_path"`
	Name     string `json:"name"`
	Type     string `json:"type"`
}

type ServerMonitor

type ServerMonitor struct {
	api.Api
}

func (ServerMonitor) ServerInfo

func (e ServerMonitor) ServerInfo(c *gin.Context)

ServerInfo 获取系统信息 @Summary 系统信息 @Description 获取JSON @Tags 系统信息 @Success 200 {object} response.Response "{"code": 200, "data": [...]}" @Router /api/v1/server-monitor [get] @Security Bearer

func (ServerMonitor) ServerVer

func (e ServerMonitor) ServerVer(c *gin.Context)

ServerVer @Summary Server Version @Description JSON @Tags System Success 200 {object} response.Response "{"code": 200, "data": [...]}" Router /api/v1/server-ver [get] Security Bearer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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