api

package
v0.0.0-...-f9427d0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiDownloadDemo1

func ApiDownloadDemo1(ctx iris.Context)

官方下载示例 https://www.studyiris.com/example/fileServer/sendFiles.html 推荐使用官方的代码进行下载,其实如果看源码的话,源码使用的下载模式和第二种相同

func ApiDownloadDemo2

func ApiDownloadDemo2(ctx iris.Context)

通过自己设置header的方式下载

func ApiDownloadDemo3

func ApiDownloadDemo3(ctx iris.Context)

使用相对路径进行下载

func ApiDownloadDemo6

func ApiDownloadDemo6(ctx iris.Context)

func ApiDownloadLimite

func ApiDownloadLimite(ctx iris.Context)

使用令牌桶限速下载

func ApiDownloadLimiteSleep

func ApiDownloadLimiteSleep(ctx iris.Context)

使用sleep限速下载 : 测试不通过

func Index

func Index(ctx iris.Context)

func IndexHelloJson

func IndexHelloJson(ctx iris.Context)

func SendURLFile

func SendURLFile(ctx iris.Context)

url对应的资源需要配置Nginx服务器

func UploadAliBill

func UploadAliBill(ctx iris.Context)

Types

type Student

type Student struct {
	Id   int
	Name string
}

变量名称必须大写否则转化json的时候不能进行转化

type User

type User struct {
	UserName string `json:"username"`
	NickName string `json:"nickname"`
	Age      int
	Birthday string
	Sex      string
	Email    string
	Phone    string
}

Jump to

Keyboard shortcuts

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