Documentation ¶
Index ¶
- Constants
- type File
- type MediaBox
- func (mediaBox MediaBox) ConfigureQorMeta(metaor resource.Metaor)
- func (mediaBox MediaBox) Crop(res *admin.Resource, db *gorm.DB, mediaOption MediaOption) (err error)
- func (mediaBox *MediaBox) Scan(data interface{}) (err error)
- func (mediaBox MediaBox) URL(styles ...string) string
- func (mediaBox MediaBox) Value() (driver.Value, error)
- type MediaBoxConfig
- type MediaLibrary
- 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
- type MediaLibraryStorage
- func (mediaLibraryStorage MediaLibraryStorage) ConfigureQorMeta(metaor resource.Metaor)
- func (mediaLibraryStorage MediaLibraryStorage) GetSizes() map[string]*media.Size
- func (mediaLibraryStorage *MediaLibraryStorage) Scan(data interface{}) (err error)
- func (mediaLibraryStorage MediaLibraryStorage) Value() (driver.Value, error)
- type MediaOption
Constants ¶
View Source
const ( ALLOW_TYPE_FILE = "file" ALLOW_TYPE_IMAGE = "image" ALLOW_TYPE_VIDEO = "video" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaBox ¶
type MediaBox struct { Values string `json:"-" gorm:"size:4294967295;"` Files []File `json:",omitempty"` }
func (MediaBox) ConfigureQorMeta ¶
type MediaBoxConfig ¶
type MediaBoxConfig struct { RemoteDataResource *admin.Resource Sizes map[string]*media.Size Max uint AllowType string admin.SelectManyConfig }
MediaBoxConfig configure MediaBox metas
func (*MediaBoxConfig) ConfigureQorMeta ¶
func (*MediaBoxConfig) ConfigureQorMeta(resource.Metaor)
func (*MediaBoxConfig) GetTemplate ¶
type MediaLibrary ¶
type MediaLibrary struct { gorm.Model SelectedType string File MediaLibraryStorage `sql:"size:4294967295;" media_library:"url:/system/{{class}}/{{primary_key}}/{{column}}.{{extension}}"` }
func (MediaLibrary) ConfigureQorResource ¶
func (MediaLibrary) ConfigureQorResource(res resource.Resourcer)
func (*MediaLibrary) GetMediaOption ¶
func (mediaLibrary *MediaLibrary) GetMediaOption() MediaOption
func (*MediaLibrary) GetSelectedType ¶
func (mediaLibrary *MediaLibrary) GetSelectedType() string
func (*MediaLibrary) ScanMediaOptions ¶
func (mediaLibrary *MediaLibrary) ScanMediaOptions(mediaOption MediaOption) error
func (*MediaLibrary) SetSelectedType ¶
func (mediaLibrary *MediaLibrary) SetSelectedType(typ string)
type MediaLibraryInterface ¶
type MediaLibraryInterface interface { ScanMediaOptions(MediaOption) error SetSelectedType(string) GetSelectedType() string GetMediaOption() MediaOption }
type MediaLibraryStorage ¶
type MediaLibraryStorage struct { oss.OSS Sizes map[string]*media.Size `json:",omitempty"` Video string SelectedType string Description string }
func (MediaLibraryStorage) ConfigureQorMeta ¶
func (mediaLibraryStorage MediaLibraryStorage) ConfigureQorMeta(metaor resource.Metaor)
func (MediaLibraryStorage) GetSizes ¶
func (mediaLibraryStorage MediaLibraryStorage) GetSizes() map[string]*media.Size
func (*MediaLibraryStorage) Scan ¶
func (mediaLibraryStorage *MediaLibraryStorage) Scan(data interface{}) (err error)
type MediaOption ¶
type MediaOption struct { Video string `json:",omitempty"` FileName string `json:",omitempty"` URL string `json:",omitempty"` OriginalURL string `json:",omitempty"` CropOptions map[string]*media.CropOption `json:",omitempty"` Sizes map[string]*media.Size `json:",omitempty"` SelectedType string `json:",omitempty"` Description string `json:",omitempty"` Crop bool }
Click to show internal directories.
Click to hide internal directories.