Documentation ¶
Index ¶
- Variables
- func Bind(protocol contract.Protocol, v interface{}) error
- func FileHash(file multipart.File) string
- func FileMime(file *multipart.FileHeader) (string, error)
- func FileName(file *multipart.FileHeader, option *contract.UploadOption) string
- func Filepath(option *contract.UploadOption) string
- type MultipartFiles
- func (m MultipartFiles) File(key string) *multipart.FileHeader
- func (m MultipartFiles) Files(key string) []*multipart.FileHeader
- func (m MultipartFiles) Save(key string, option *contract.UploadOption) ([]*contract.FileInfo, error)
- func (m MultipartFiles) SaveAll(option *contract.UploadOption) (map[string][]*contract.FileInfo, error)
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 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 (m MultipartFiles) File(key string) *multipart.FileHeader
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)
Click to show internal directories.
Click to hide internal directories.