Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UploadConfig = &upConfig{ MemoryLimit: int64(512 * 1024), Logger: &defaultLogger{}, }
Functions ¶
func SizeUploadHandler ¶
func SizeUploadHandler(req *http.Request, urlPath string, w http.ResponseWriter, fileHandler ProcessFileHandler)
Types ¶
type BizConf ¶
type BizConf struct {
BizLine string `yaml:"bizLine,omitempty"`
MaxLength int64 `yaml:"maxLength,omitempty"`
Subs []BizLineConf `yaml:"subs,omitempty"`
}
type BizLineConf ¶
type ParsedFile ¶
type ProcessFileHandler ¶
type ProcessFileHandler func(file *ParsedFile, userId int64, context context.Context) (*ProcessFileResult, error)
type ProcessFileResult ¶
type ResultOutput ¶
type ResultOutput interface {
OutputResult(w http.ResponseWriter, ctx context.Context, result *ProcessFileResult)
OutputExceed(w http.ResponseWriter, ctx context.Context)
OutputNoAuth(w http.ResponseWriter, ctx context.Context)
OutputErr(w http.ResponseWriter, ctx context.Context, err error)
}
func NewJsonResultOutput ¶
func NewJsonResultOutput() ResultOutput
type SizeProvider ¶
func NewConfSizeProvider ¶
func NewConfSizeProvider() (SizeProvider, error)
func NewConfSizeProviderByConfFile ¶
func NewConfSizeProviderByConfFile(confFile string) (SizeProvider, error)
type YamlConfig ¶
Click to show internal directories.
Click to hide internal directories.