Documentation ¶
Index ¶
- Variables
- type Errors
- type Factory
- func (f Factory) GenerateDirName(dir string, isAdmin bool, fb string) string
- func (f Factory) GenerateName(name string, random bool, slugify bool) string
- func (f Factory) GetExtension(content *multipart.FileHeader) string
- func (f Factory) New(cnf ValidateConfig) ([]byte, *i18np.Error)
- func (f Factory) NewImage(cnf ValidateConfig) ([]byte, *i18np.Error)
- func (f Factory) RandomName() string
- func (f Factory) Validate(cnf ValidateConfig) *i18np.Error
- type MinifyLevel
- type Repository
- type ValidateConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var I18nMessages = messages{
InternalError: "cdn_internal_error",
ContentRequired: "cdn_content_required",
TypeNotAccepted: "cdn_type_not_accepted",
SizeTooBig: "cdn_size_too_big",
SizeTooSmall: "cdn_size_too_small",
}
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { Errors Errors // contains filtered or unexported fields }
func NewFactory ¶
func NewFactory() Factory
func (Factory) GenerateDirName ¶
func (Factory) GenerateName ¶
func (Factory) GetExtension ¶
func (f Factory) GetExtension(content *multipart.FileHeader) string
func (Factory) RandomName ¶
type MinifyLevel ¶
type MinifyLevel float32
const ( MinifyLevelNone MinifyLevel = iota MinifyLevelLow MinifyLevel = 2 // 2 MB MinifyLevelMedium MinifyLevel = 1 // 1 MB MinifyLevelHigh MinifyLevel = 0.5 // 0.5 MB )
type Repository ¶
type ValidateConfig ¶
Click to show internal directories.
Click to hide internal directories.