Documentation ¶
Index ¶
- Constants
- Variables
- func ActionWorkerExample(b *presets.Builder, db *gorm.DB) http.Handler
- func ActivityExample(b *presets.Builder, db *gorm.DB) http.Handler
- func ConsumeQueItem(job worker.QueJobInterface) (err error)
- func ExampleDB() (db *gorm.DB)
- func InternationalizationExample(b *presets.Builder, db *gorm.DB) http.Handler
- func ListingExample(b *presets.Builder, db *gorm.DB) http.Handler
- func LocalizationExample(b *presets.Builder, db *gorm.DB) http.Handler
- func MountActionWorker(b *presets.Builder)
- func MountWorker(b *presets.Builder)
- func Mux(mux *http.ServeMux, prefix string) http.Handler
- func PageBuilderExample(b *presets.Builder, db *gorm.DB) http.Handler
- func PublishExample(b *presets.Builder, db *gorm.DB) http.Handler
- func SEOExampleBasic(b *presets.Builder, db *gorm.DB) http.Handler
- func SamplesHandler(mux examples.Muxer, prefix string)
- func TestHandler(pageBuilder *pagebuilder.Builder, b *presets.Builder) http.Handler
- func WorkerExample(b *presets.Builder, db *gorm.DB) http.Handler
- type Campaign
- type CampaignContent
- type Category
- type ExampleResource
- type L10nModel
- type Messages
- type Messages_ModelsI18nModuleKey
- type MyContent
- type Post
- type Product
- type ProductContent
- type SEOPost
- type User
- type WithPublishProduct
- func (p *WithPublishProduct) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (p *WithPublishProduct) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (p *WithPublishProduct) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (p *WithPublishProduct) PrimarySlug() string
Constants ¶
View Source
const I18nExampleKey i18n.ModuleKey = "I18nExampleKey"
@snippet_begin(I18nMessagesExample)
Variables ¶
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 ConsumeQueItem ¶
func ConsumeQueItem(job worker.QueJobInterface) (err error)
func MountActionWorker ¶
func MountWorker ¶
func PublishExample ¶
@snippet_end
func SamplesHandler ¶
func TestHandler ¶
Types ¶
type CampaignContent ¶
containers
type ExampleResource ¶
type L10nModel ¶
@snippet_begin(L10nModelExample)
func (*L10nModel) PrimaryColumnValuesBySlug ¶
func (*L10nModel) PrimarySlug ¶
type WithPublishProduct ¶
type WithPublishProduct struct { gorm.Model Name string Price int publish.Status publish.Schedule publish.Version }
@snippet_begin(PublishInjectModules)
func (*WithPublishProduct) GetPublishActions ¶
func (p *WithPublishProduct) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (*WithPublishProduct) GetUnPublishActions ¶
func (p *WithPublishProduct) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (*WithPublishProduct) PrimaryColumnValuesBySlug ¶
func (p *WithPublishProduct) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*WithPublishProduct) PrimarySlug ¶
func (p *WithPublishProduct) PrimarySlug() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.