predefined

package
v0.0.0-...-2f69930 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UploadTypeImage       = "image"
	UploadTypeMedia       = "media"
	UploadTypeDocument    = "document"
	UploadTypeCompression = "compression"
	UploadTypeFile        = "file"
)
View Source
const (
	FormNameFile           = "file"
	FormNameFileBase64Data = "file_base64_data"
)
View Source
const (
	ErrorNotFoundUserIDFromRequestClaims = "not found user_id from request claims"
	ErrorNotFoundClaimsFromRequest       = "not found claims from request"
	ErrorFalidSaveFile                   = "Fail to save file"
	ErrorNotFoundEncodeData              = "Not Found encode data"
	ErrorNotFoundFormData                = "Not found form data"
	ErrorNotAllowUploadLocal             = "not allow upload local"
)
View Source
const (
	UploadStorageLocal = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestServeFile

type RequestServeFile struct {
	RequestServeFileType
	Remark string `form:"remark"`
}

type RequestServeFileType

type RequestServeFileType struct {
	FileType string `form:"file_type" validate:"required"`
}

type RequestServeUploadID

type RequestServeUploadID struct {
	ID primitive.ObjectID `form:"id" validate:"required"`
}

type Upload

type Upload interface {
	SaveEncodeFile(*http.Request, string) (*model.Upload, error)
	SaveFormFile(*http.Request, string) (*model.Upload, error)
}

Jump to

Keyboard shortcuts

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