binding

package
v0.0.0-...-b8bf349 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProtocolTypeError = errors.New("the protocol only support http protocol")
	Form              = form{}
)
View Source
var (
	JSON = json{}
)
View Source
var (
	MultipartForm = multipartForm{}
)

Functions

func Bind

func Bind(protocol contract.Protocol, v interface{}) error

func FileHash

func FileHash(file multipart.File) string

func FileMime

func FileMime(file *multipart.FileHeader) (string, error)

func FileName

func FileName(file *multipart.FileHeader, option *contract.UploadOption) string

func Filepath

func Filepath(option *contract.UploadOption) string

Types

type MultipartFiles

type MultipartFiles map[string][]*multipart.FileHeader

func (MultipartFiles) File

func (MultipartFiles) Files

func (m MultipartFiles) Files(key string) []*multipart.FileHeader

func (MultipartFiles) Save

func (m MultipartFiles) Save(key string, option *contract.UploadOption) ([]*contract.FileInfo, error)

func (MultipartFiles) SaveAll

func (m MultipartFiles) SaveAll(option *contract.UploadOption) (map[string][]*contract.FileInfo, error)

Jump to

Keyboard shortcuts

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