Documentation ¶
Index ¶
- Constants
- Variables
- func ActionWorkerExampleMock(b *presets.Builder)
- func ConsumeQueItem(job worker.QueJobInterface) (err error)
- func InternationalizationExample(b *presets.Builder)
- func ListingSample(b *presets.Builder)
- func LocalizationExampleMock(b *presets.Builder)
- func MountActionWorker(b *presets.Builder)
- func MountWorker(b *presets.Builder)
- func PresetsBasicFilter(b *presets.Builder)
- func PresetsConfirmDialog(b *presets.Builder)
- func PublishExample(b *presets.Builder)
- func WorkerExampleMock(b *presets.Builder)
- type Category
- type ExampleResource
- type L10nModel
- type Messages
- type Messages_ModelsI18nModuleKey
- type Post
- type Product
- func (p *Product) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (p *Product) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (p *Product) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (p *Product) PrimarySlug() string
- type User
Constants ¶
View Source
const ActionWorkerExamplePath = "/samples/action_worker"
View Source
const I18nExampleKey i18n.ModuleKey = "I18nExampleKey"
@snippet_begin(I18nMessagesExample)
View Source
const InternationalizationExamplePath = "/samples/i18n"
View Source
const ListingSamplePath = "/samples/listing"
View Source
const LocalizationExamplePath = "/samples/l10n"
View Source
const PresetsBasicFilterPath = "/samples/basic_filter"
View Source
const PresetsConfirmDialogPath = "/samples/confirm_dialog"
View Source
const PublishExamplePath = "/samples/publish"
View Source
const WorkerExamplePath = "/samples/worker"
Variables ¶
View Source
var DB *gorm.DB
View Source
var Messages_en_US = &Messages{
Admin: "Admin",
Welcome: "Welcome",
}
View Source
var Messages_ja_JP = &Messages{
Admin: "管理システム",
Welcome: "ようこそ",
}
View Source
var Messages_ja_JP_ModelsI18nModuleKey = &Messages_ModelsI18nModuleKey{
Homes: "ホーム",
Videos: "ビデオ",
VideosName: "ビデオの名前",
VideosDescription: "ビデオの説明",
}
View Source
var Messages_zh_CN = &Messages{
Admin: "管理系统",
Welcome: "欢迎",
}
View Source
var Messages_zh_CN_ModelsI18nModuleKey = &Messages_ModelsI18nModuleKey{
Homes: "主页",
Videos: "视频",
VideosName: "视频名称",
VideosDescription: "视频描述",
}
View Source
var Que = &mock.QueueMock{ AddFunc: func(ctx context.Context, job worker.QueJobInterface) error { jobInfo, err := job.GetJobInfo() if err != nil { return err } if scheduler, ok := jobInfo.Argument.(worker.Scheduler); ok && scheduler.GetScheduleTime() != nil { job.SetStatus(worker.JobStatusScheduled) go func() { time.Sleep(scheduler.GetScheduleTime().Sub(time.Now())) ConsumeQueItem(job) }() } else { go func() { ConsumeQueItem(job) }() } return nil }, KillFunc: func(ctx context.Context, job worker.QueJobInterface) error { return job.SetStatus(worker.JobStatusKilled) }, ListenFunc: func(jobDefs []*worker.QorJobDefinition, getJob func(qorJobID uint) (worker.QueJobInterface, error)) error { return nil }, RemoveFunc: func(ctx context.Context, job worker.QueJobInterface) error { return job.SetStatus(worker.JobStatusCancelled) }, }
Functions ¶
func ActionWorkerExampleMock ¶
func ConsumeQueItem ¶
func ConsumeQueItem(job worker.QueJobInterface) (err error)
func ListingSample ¶
func LocalizationExampleMock ¶
func MountActionWorker ¶
func MountWorker ¶
func PresetsBasicFilter ¶
func PresetsConfirmDialog ¶
func PublishExample ¶
func WorkerExampleMock ¶
Types ¶
type ExampleResource ¶
type L10nModel ¶
@snippet_begin(L10nModelExample)
func (*L10nModel) PrimaryColumnValuesBySlug ¶
func (*L10nModel) PrimarySlug ¶
type Product ¶
type Product struct { gorm.Model Name string Price int publish.Status publish.Schedule publish.Version }
@snippet_begin(PublishInjectModules)
func (*Product) GetPublishActions ¶
func (p *Product) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (*Product) GetUnPublishActions ¶
func (p *Product) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (*Product) PrimaryColumnValuesBySlug ¶
func (*Product) PrimarySlug ¶
Click to show internal directories.
Click to hide internal directories.