microsite

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaximumNumberOfFilesCopiedAtTheSameTime = 10
View Source
var MaximumNumberOfFilesUploadedAtTheSameTime = 10
View Source
var PackageAndPreviewPrepath = "microsite"

Functions

This section is empty.

Types

type FileSystem

type FileSystem struct {
	FileName string
	Url      string
}

func (*FileSystem) Scan

func (this *FileSystem) Scan(value interface{}) error

func (FileSystem) Value

func (this FileSystem) Value() (driver.Value, 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 (this MicroSite) GetFileList() (arr []string)

func (MicroSite) GetID

func (this MicroSite) GetID() uint

func (*MicroSite) GetPackage

func (this *MicroSite) GetPackage() FileSystem

func (MicroSite) GetPackagePath

func (this MicroSite) GetPackagePath(fileName string) string

func (MicroSite) GetPackageUrl

func (this MicroSite) GetPackageUrl(domain string) string

func (MicroSite) GetPreviewPath

func (this MicroSite) GetPreviewPath(fileName string) string

func (MicroSite) GetPreviewUrl

func (this MicroSite) GetPreviewUrl(domain, fileName string) string

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 (this MicroSite) GetPublishedPath(fileName string) string

func (MicroSite) GetPublishedUrl

func (this MicroSite) GetPublishedUrl(domain, fileName string) string

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 (this MicroSite) GetUnixKey() string

func (*MicroSite) PermissionRN

func (this *MicroSite) PermissionRN() []string

func (*MicroSite) PrimaryColumnValuesBySlug

func (this *MicroSite) PrimaryColumnValuesBySlug(slug string) map[string]string

func (*MicroSite) PrimarySlug

func (this *MicroSite) PrimarySlug() string

func (*MicroSite) SetFilesList

func (this *MicroSite) SetFilesList(filesList []string)

func (*MicroSite) SetPackage

func (this *MicroSite) SetPackage(fileName, url string)

func (*MicroSite) SetUnixKey

func (this *MicroSite) SetUnixKey()

func (*MicroSite) UnArchiveAndPublish

func (this *MicroSite) UnArchiveAndPublish(getPath func(string) string, fileName string, f io.Reader, storage oss.StorageInterface) (filesList []string, err error)

type MicroSiteInterface

type MicroSiteInterface interface {
	GetID() uint
	GetVersionName() string
	GetUnixKey() string
	SetUnixKey()
	GetStatus() string

	GetPackagePath(fileName string) string
	GetPackageUrl(domain string) string
	GetPreviewPath(fileName string) 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)
	UnArchiveAndPublish(getPath func(string) string, fileName string, f io.Reader, storage oss.StorageInterface) (filesList []string, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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