Versions in this module Expand all Collapse all v1 v1.0.2 May 8, 2021 v1.0.1 May 3, 2021 v1.0.0 Apr 19, 2021 Changes in this version + func RegisterCallbacks(db *gorm.DB) + func RegisterMediaHandler(name string, handler MediaHandler) + type AssetManager struct + File FileSystem + func (*AssetManager) ConfigureQorResource(res resource.Resourcer) + type Base struct + Crop bool + CropOptions map[string]*CropOption + Delete bool + FileHeader FileHeader + FileName string + Reader io.Reader + Url string + func (Base) ConfigureQorMetaBeforeInitialize(meta resource.Metaor) + func (b *Base) Cropped(values ...bool) (result bool) + func (b *Base) GetCropOption(name string) *image.Rectangle + func (b *Base) NeedCrop() bool + func (b *Base) Scan(data interface{}) (err error) + func (b Base) Ext() string + func (b Base) GetFileHeader() FileHeader + func (b Base) GetFileName() string + func (b Base) GetSizes() map[string]*Size + func (b Base) GetURL(option *Option, scope *gorm.Scope, field *gorm.Field, templater URLTemplater) string + func (b Base) GetURLTemplate(option *Option) (path string) + func (b Base) IsImage() bool + func (b Base) IsVideo() bool + func (b Base) Retrieve(url string) (*os.File, error) + func (b Base) String() string + func (b Base) URL(styles ...string) string + func (b Base) Value() (driver.Value, error) + type CropOption struct + Height int + Width int + X int + Y int + type File struct + Description string + ID json.Number + Url string + func (file File) IsImage() bool + func (file File) IsVideo() bool + func (file File) URL(styles ...string) string + type FileHeader interface + Open func() (multipart.File, error) + type FileSystem struct + func (f FileSystem) GetFullPath(url string, option *Option) (path string, err error) + func (f FileSystem) Retrieve(url string) (*os.File, error) + func (f FileSystem) Store(name string, option *Option, reader io.Reader) (err error) + type Media interface + Cropped func(values ...bool) bool + Ext func() string + GetCropOption func(name string) *image.Rectangle + GetFileHeader func() FileHeader + GetFileName func() string + GetSizes func() map[string]*Size + GetURL func(option *Option, scope *gorm.Scope, field *gorm.Field, templater URLTemplater) string + GetURLTemplate func(*Option) string + IsImage func() bool + NeedCrop func() bool + Retrieve func(url string) (*os.File, error) + Scan func(value interface{}) error + Store func(url string, option *Option, reader io.Reader) error + String func() string + URL func(style ...string) string + Value func() (driver.Value, error) + type MediaBox struct + Files []File + Values string + func (mediaBox *MediaBox) Scan(data interface{}) (err error) + func (mediaBox MediaBox) ConfigureQorMeta(metaor resource.Metaor) + func (mediaBox MediaBox) Crop(res *admin.Resource, db *gorm.DB, mediaOption MediaOption) (err error) + func (mediaBox MediaBox) URL(styles ...string) string + func (mediaBox MediaBox) Value() (driver.Value, error) + type MediaBoxConfig struct + Max uint + RemoteDataResource *admin.Resource + Sizes map[string]*Size + func (*MediaBoxConfig) ConfigureQorMeta(resource.Metaor) + func (*MediaBoxConfig) GetTemplate(context *admin.Context, metaType string) ([]byte, error) + type MediaHandler interface + CouldHandle func(media Media) bool + Handle func(media Media, file multipart.File, option *Option) error + type MediaLibrary struct + File MediaLibraryStorage + SelectedType string + func (MediaLibrary) ConfigureQorResource(res resource.Resourcer) + func (mediaLibrary *MediaLibrary) GetMediaOption() MediaOption + func (mediaLibrary *MediaLibrary) GetSelectedType() string + func (mediaLibrary *MediaLibrary) ScanMediaOptions(mediaOption MediaOption) error + func (mediaLibrary *MediaLibrary) SetSelectedType(typ string) + type MediaLibraryInterface interface + GetMediaOption func() MediaOption + GetSelectedType func() string + ScanMediaOptions func(MediaOption) error + SetSelectedType func(string) + type MediaLibraryStorage struct + Description string + SelectedType string + Sizes map[string]*Size + Video string + func (mediaLibraryStorage *MediaLibraryStorage) Scan(data interface{}) (err error) + func (mediaLibraryStorage MediaLibraryStorage) ConfigureQorMeta(metaor resource.Metaor) + func (mediaLibraryStorage MediaLibraryStorage) GetSizes() map[string]*Size + func (mediaLibraryStorage MediaLibraryStorage) Value() (driver.Value, error) + type MediaOption struct + Crop bool + CropOptions map[string]*CropOption + Description string + FileName string + OriginalURL string + SelectedType string + Sizes map[string]*Size + URL string + Video string + type Option map[string]string + func (option Option) Get(key string) string + type Size struct + Height int + Width int + type URLTemplater interface + GetURLTemplate func(*Option) string