microsite

package
v3.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const I18nMicrositeKey i18n.ModuleKey = "I18nMicrositeKey"

Variables

View Source
var (
	MaximumNumberOfFilesCopiedAtTheSameTime = 10
)
View Source
var (
	MaximumNumberOfFilesUploadedAtTheSameTime = 10
)
View Source
var Messages_en_US = &Messages{
	CurrentPackage: "Current Package",
}
View Source
var Messages_zh_CN = &Messages{
	CurrentPackage: "当前压缩包",
}

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func New

func New(db *gorm.DB) *Builder

func (*Builder) ContextValueProvider

func (b *Builder) ContextValueProvider(in context.Context) context.Context

func (*Builder) Install

func (mib *Builder) Install(b *presets.Builder) error

func (*Builder) PackageAndPreviewPrepath

func (b *Builder) PackageAndPreviewPrepath(v string) *Builder

func (*Builder) Publisher

func (b *Builder) Publisher(v *publish.Builder) (r *Builder)

func (*Builder) Storage

func (b *Builder) Storage(v oss.StorageInterface) (r *Builder)

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 Messages

type Messages struct {
	CurrentPackage string
}

type MicroSite

type MicroSite struct {
	gorm.Model
	publish.Status
	publish.Schedule
	publish.Version
	Name        string
	Description string
	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) GetPackageUrl

func (this MicroSite) GetPackageUrl(domain string) string

func (*MicroSite) GetPublishActions

func (this *MicroSite) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*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(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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