file

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// 所属的Group
	V1 route.Group // 属于v1分组

	// 标志文件上传/下载属性
	File route.File `file:"Add,get"` // 使用tag来指定方法

	// 有tag则只对tag里的添加,没有则全部方法均添加(这时参数怎么指定呢?`rate:"Rate(0.25, 2)"`)
	Limiter route.Limiter `method:"Add(0.25, 2);Get(0.25, 2)"` // 指定限流器,包括方法和参数; 多个方法使用分号分隔
}

File 文件

func (*File) Add

func (file *File) Add(ctx context.Context, param route.Param) (r route.Result, err error)

Add 上传文件

func (*File) Get

func (file *File) Get(ctx context.Context, param route.Param) (r route.Result, err error)

Get 下载文件

Jump to

Keyboard shortcuts

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