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 AutoCompleteBasicFilterExample(b *presets.Builder, ab *autocomplete.Builder, db *gorm.DB) http.Handler
 - func AutoSyncExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func ChangePasswordExample(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 LinkageSelectFilterItemRemoteExample(b *presets.Builder, mux examples.Muxer, 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 MediaAllowTypesExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func MediaExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func MountActionWorker(b *presets.Builder)
 - func MountWorker(b *presets.Builder)
 - func Mux(mux *http.ServeMux) http.Handler
 - func PageBuilderExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func ProfileExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func PublishExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func RedirectionExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func SEOExampleBasic(b *presets.Builder, db *gorm.DB) http.Handler
 - func SamplesHandler(mux webexamples.Muxer)
 - func SingletonExample(b *presets.Builder, db *gorm.DB) http.Handler
 - func TestHandler(pageBuilder *pagebuilder.Builder, b *presets.Builder) http.Handler
 - func WorkerExample(b *presets.Builder, db *gorm.DB) http.Handler
 - type AutoCompletePost
 - type Campaign
 - func (b *Campaign) GetTitle() string
 - func (p *Campaign) PrimaryColumnValuesBySlug(slug string) map[string]string
 - func (p *Campaign) PrimarySlug() string
 - func (b *Campaign) PublishUrl(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (s string)
 - func (b *Campaign) WrapPublishActions(in publish.PublishActionsFunc) publish.PublishActionsFunc
 
- type CampaignContent
 - type CampaignProduct
 - type CampaignProductTemplate
 - type CampaignTemplate
 - type Category
 - type ExampleResource
 - type Item
 - type L10nModel
 - type LinkageSelectFilterItemRemoteServer
 - type MediaRole
 - type Messages
 - type Messages_ModelsI18nModuleKey
 - type MyContent
 - type PageProduct
 - type PagesContent
 - type PaginatedResponse
 - type Post
 - type ProductContent
 - type ProfileUser
 - type QueryParams
 - type SEOPost
 - type User
 - type WithPublishProduct
 - func (p *WithPublishProduct) GetPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
 - func (p *WithPublishProduct) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
 - func (p *WithPublishProduct) PrimaryColumnValuesBySlug(slug string) map[string]string
 - func (p *WithPublishProduct) PrimarySlug() string
 
- type WithSingletenProduct
 
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 ChangePasswordExample ¶
func ConsumeQueItem ¶
func ConsumeQueItem(job worker.QueJobInterface) (err error)
func MediaAllowTypesExample ¶
func MountActionWorker ¶
func MountWorker ¶
func PublishExample ¶
@snippet_end
func SamplesHandler ¶
func SamplesHandler(mux webexamples.Muxer)
func TestHandler ¶
Types ¶
type AutoCompletePost ¶
type Campaign ¶
models
func (*Campaign) PrimaryColumnValuesBySlug ¶
func (*Campaign) PrimarySlug ¶
func (*Campaign) PublishUrl ¶
func (*Campaign) WrapPublishActions ¶
func (b *Campaign) WrapPublishActions(in publish.PublishActionsFunc) publish.PublishActionsFunc
type CampaignContent ¶
type CampaignContent struct {
	ID     uint
	Title  string
	Banner string
	Image  media_library.MediaBox
}
    containers
type CampaignProduct ¶
type CampaignProduct struct {
	gorm.Model
	Name string
	publish.Status
	publish.Schedule
	publish.Version
}
    models
func (*CampaignProduct) GetTitle ¶
func (b *CampaignProduct) GetTitle() string
func (*CampaignProduct) PrimaryColumnValuesBySlug ¶
func (p *CampaignProduct) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*CampaignProduct) PrimarySlug ¶
func (p *CampaignProduct) PrimarySlug() string
func (*CampaignProduct) PublishUrl ¶
func (b *CampaignProduct) PublishUrl(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (s string)
type CampaignProductTemplate ¶
templates
func (*CampaignProductTemplate) GetDescription ¶
func (b *CampaignProductTemplate) GetDescription(ctx *web.EventContext) string
func (*CampaignProductTemplate) GetName ¶
func (b *CampaignProductTemplate) GetName(ctx *web.EventContext) string
func (*CampaignProductTemplate) PrimaryColumnValuesBySlug ¶
func (p *CampaignProductTemplate) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*CampaignProductTemplate) PrimarySlug ¶
func (p *CampaignProductTemplate) PrimarySlug() string
type CampaignTemplate ¶
templates
func (*CampaignTemplate) PrimaryColumnValuesBySlug ¶
func (p *CampaignTemplate) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*CampaignTemplate) PrimarySlug ¶
func (p *CampaignTemplate) PrimarySlug() string
type ExampleResource ¶
type L10nModel ¶
@snippet_begin(L10nModelExample)
func (*L10nModel) PrimaryColumnValuesBySlug ¶
func (*L10nModel) PrimarySlug ¶
type LinkageSelectFilterItemRemoteServer ¶
type LinkageSelectFilterItemRemoteServer struct{}
    func (*LinkageSelectFilterItemRemoteServer) ServeHTTP ¶
func (b *LinkageSelectFilterItemRemoteServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PageProduct ¶
models
func (*PageProduct) GetTitle ¶
func (b *PageProduct) GetTitle() string
func (*PageProduct) PrimaryColumnValuesBySlug ¶
func (p *PageProduct) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*PageProduct) PrimarySlug ¶
func (p *PageProduct) PrimarySlug() string
func (*PageProduct) PublishUrl ¶
func (b *PageProduct) PublishUrl(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (s string)
type PaginatedResponse ¶
type ProfileUser ¶
type QueryParams ¶
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(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*WithPublishProduct) GetUnPublishActions ¶
func (p *WithPublishProduct) GetUnPublishActions(ctx context.Context, db *gorm.DB, storage oss.StorageInterface) (actions []*publish.PublishAction, err error)
func (*WithPublishProduct) PrimaryColumnValuesBySlug ¶
func (p *WithPublishProduct) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*WithPublishProduct) PrimarySlug ¶
func (p *WithPublishProduct) PrimarySlug() string
type WithSingletenProduct ¶
      
      Source Files
      ¶
    
- action_worker.go
 - action_worker_mock_que.go
 - activity.go
 - autocomplete.go
 - autosync.go
 - internationalization.go
 - layout.go
 - linkage_select_filter_item_remote.go
 - linkage_select_filter_item_remote_server.go
 - listing.go
 - localization.go
 - login.go
 - media.go
 - media_allow_types.go
 - mux.go
 - page_builder_with_campaign.go
 - permission.go
 - profile.go
 - publish.go
 - redirection.go
 - role.go
 - seo.go
 - singleton.go
 - worker.go
 - worker_mock_que.go
 
 Click to show internal directories. 
   Click to hide internal directories.