Documentation
¶
Index ¶
- Variables
- type FileSystem
- type MicroSite
- func (this MicroSite) GetFileList() (arr []string)
- func (this *MicroSite) GetFilesListAndPublishPreviewFiles(fileName string, fileBytes []byte, storage oss.StorageInterface) (filesList []string, err error)
- func (this MicroSite) GetID() uint
- func (this *MicroSite) GetPackage() FileSystem
- func (this MicroSite) GetPackagePath(fileName string) string
- func (this MicroSite) GetPackageUrl(domain string) string
- func (this MicroSite) GetPreviewPath(fileName string) string
- func (this MicroSite) GetPreviewPrePath() string
- func (this MicroSite) GetPreviewUrl(domain, fileName string) string
- func (this *MicroSite) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (this MicroSite) GetPublishedPath(fileName string) string
- func (this MicroSite) GetPublishedUrl(domain, fileName string) string
- func (this *MicroSite) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (this MicroSite) GetUnixKey() string
- func (this *MicroSite) PermissionRN() []string
- func (this *MicroSite) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (this *MicroSite) PrimarySlug() string
- func (this *MicroSite) PublishArchiveFiles(fileName string, fileBytes []byte, storage oss.StorageInterface) (err error)
- func (this *MicroSite) SetFilesList(filesList []string)
- func (this *MicroSite) SetPackage(fileName, url string)
- func (this *MicroSite) SetUnixKey()
- type MicroSiteInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var INVALID_ARCHIVER_ERROR = errors.New("unarr: No valid RAR, ZIP, 7Z or TAR archive")
View Source
var MaximumNumberOfFilesInArchive = 200
MaximumNumberOfFilesInArchive can't be lager than 1000, otherwise, s3's DeleteObjects will return error. The more files, the longer the upload time.
View Source
var MaximumNumberOfFilesUploadedAtTheSameTime = 10
View Source
var PackageAndPreviewPrepath = "microsite"
View Source
var TOO_MANY_FILE_ERROR = errors.New("Too many uploaded files, please contact the administrator")
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
func (*FileSystem) Scan ¶
func (this *FileSystem) Scan(value interface{}) error
type MicroSite ¶
type MicroSite struct { gorm.Model publish.Status publish.Schedule publish.Version PrePath string Package FileSystem `gorm:"type:text"` FilesList string `gorm:"type:text"` UnixKey string }
func (MicroSite) GetFileList ¶
func (*MicroSite) GetFilesListAndPublishPreviewFiles ¶
func (*MicroSite) GetPackage ¶
func (this *MicroSite) GetPackage() FileSystem
func (MicroSite) GetPackagePath ¶
func (MicroSite) GetPackageUrl ¶
func (MicroSite) GetPreviewPath ¶
func (MicroSite) GetPreviewPrePath ¶
func (MicroSite) GetPreviewUrl ¶
func (*MicroSite) GetPublishActions ¶
func (this *MicroSite) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (MicroSite) GetPublishedPath ¶
func (MicroSite) GetPublishedUrl ¶
func (*MicroSite) GetUnPublishActions ¶
func (this *MicroSite) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (MicroSite) GetUnixKey ¶
func (*MicroSite) PermissionRN ¶
func (*MicroSite) PrimaryColumnValuesBySlug ¶
func (*MicroSite) PrimarySlug ¶
func (*MicroSite) PublishArchiveFiles ¶
func (*MicroSite) SetFilesList ¶
func (*MicroSite) SetPackage ¶
func (*MicroSite) SetUnixKey ¶
func (this *MicroSite) SetUnixKey()
type MicroSiteInterface ¶
type MicroSiteInterface interface { GetID() uint GetVersionName() string GetUnixKey() string SetUnixKey() GetStatus() string GetPackagePath(fileName string) string GetPreviewPrePath() string GetPreviewUrl(domain, fileName string) string GetPublishedPath(fileName string) string GetPublishedUrl(domain, fileName string) string GetFileList() (arr []string) SetFilesList(filesList []string) GetPackage() FileSystem SetPackage(fileName, url string) GetPackageUrl(domain string) string GetFilesListAndPublishPreviewFiles(fileName string, fileBytes []byte, storage oss.StorageInterface) (filesList []string, err error) PublishArchiveFiles(fileName string, fileBytes []byte, storage oss.StorageInterface) (err error) }
Click to show internal directories.
Click to hide internal directories.