Documentation ¶
Index ¶
- Constants
- Variables
- func GetSettingsFileName(mode string) string
- func NormalizeFileName(filename, mode string) string
- type CWHeader
- type CWSettings
- func (instance *CWSettings) LoadFromFile(filename string) (err error)
- func (instance *CWSettings) LoadFromJson(text string) (err error)
- func (instance *CWSettings) LoadFromMap(m map[string]interface{}) (err error)
- func (instance *CWSettings) Map() map[string]interface{}
- func (instance *CWSettings) String() string
- type CWSettingsEditorialPlan
- func (instance *CWSettingsEditorialPlan) AutoClassify(text string, maxCount int) (response []*CWSettingsEditorialPlanCategory)
- func (instance *CWSettingsEditorialPlan) BuildClassificationOptionsFromCategories(detectLanguage bool) (response *nlp_classifier.NlpClassificationOptions)
- func (instance *CWSettingsEditorialPlan) GetCategoryByUID(uid string) (response *CWSettingsEditorialPlanCategory)
- func (instance *CWSettingsEditorialPlan) GetFirstCategory() (response *CWSettingsEditorialPlanCategory)
- func (instance *CWSettingsEditorialPlan) GetNowSpecial() (special *CWSettingsEditorialPlanSpecial)
- func (instance *CWSettingsEditorialPlan) ListAllCategories() (response []*CWSettingsEditorialPlanCategory)
- type CWSettingsEditorialPlanCategory
- type CWSettingsEditorialPlanSpecial
- type CWSettingsProducers
- type CWSettingsPrompt
- type CWSettingsPublishing
- type CWSettingsPublishingLocalization
- type CWSettingsPublishingProducerImage
- type CWSettingsPublishingProducerText
- type CWSettingsPublishingTarget
- type CWSettingsScheduler
Constants ¶
View Source
const CWSettingsFileName = "copywriter.%s.json"
Variables ¶
View Source
var TplSettings string
Functions ¶
func GetSettingsFileName ¶
func NormalizeFileName ¶
Types ¶
type CWSettings ¶
type CWSettings struct { Lang string `json:"lang"` Producers *CWSettingsProducers `json:"producers"` Publishing *CWSettingsPublishing `json:"publishing"` Scheduler *CWSettingsScheduler `json:"scheduler"` EditorialPlan *CWSettingsEditorialPlan `json:"editorial_plan"` }
func InitSettings ¶
func InitSettings(mode string, args ...interface{}) (settings *CWSettings, err error)
func (*CWSettings) LoadFromFile ¶
func (instance *CWSettings) LoadFromFile(filename string) (err error)
func (*CWSettings) LoadFromJson ¶
func (instance *CWSettings) LoadFromJson(text string) (err error)
func (*CWSettings) LoadFromMap ¶
func (instance *CWSettings) LoadFromMap(m map[string]interface{}) (err error)
func (*CWSettings) Map ¶
func (instance *CWSettings) Map() map[string]interface{}
func (*CWSettings) String ¶
func (instance *CWSettings) String() string
type CWSettingsEditorialPlan ¶
type CWSettingsEditorialPlan struct { Specials []*CWSettingsEditorialPlanSpecial `json:"specials"` Categories []*CWSettingsEditorialPlanCategory `json:"categories"` // contains filtered or unexported fields }
func (*CWSettingsEditorialPlan) AutoClassify ¶
func (instance *CWSettingsEditorialPlan) AutoClassify(text string, maxCount int) (response []*CWSettingsEditorialPlanCategory)
AutoClassify Classify a text searching into editorial plan categories
func (*CWSettingsEditorialPlan) BuildClassificationOptionsFromCategories ¶
func (instance *CWSettingsEditorialPlan) BuildClassificationOptionsFromCategories(detectLanguage bool) (response *nlp_classifier.NlpClassificationOptions)
func (*CWSettingsEditorialPlan) GetCategoryByUID ¶
func (instance *CWSettingsEditorialPlan) GetCategoryByUID(uid string) (response *CWSettingsEditorialPlanCategory)
func (*CWSettingsEditorialPlan) GetFirstCategory ¶
func (instance *CWSettingsEditorialPlan) GetFirstCategory() (response *CWSettingsEditorialPlanCategory)
func (*CWSettingsEditorialPlan) GetNowSpecial ¶
func (instance *CWSettingsEditorialPlan) GetNowSpecial() (special *CWSettingsEditorialPlanSpecial)
func (*CWSettingsEditorialPlan) ListAllCategories ¶
func (instance *CWSettingsEditorialPlan) ListAllCategories() (response []*CWSettingsEditorialPlanCategory)
type CWSettingsEditorialPlanCategory ¶
type CWSettingsEditorialPlanCategory struct { Uid string `json:"uid"` Name string `json:"name"` Description string `json:"description"` TextPrompt *CWSettingsPrompt `json:"txt-prompt"` SeoEnabled bool `json:"seo_enabled,omitempty"` ClassificationRules []string `json:"classification_rules,omitempty"` // use classification rules tu auto categorize a post to fit in plan Children []*CWSettingsEditorialPlanCategory `json:"children,omitempty"` }
func (*CWSettingsEditorialPlanCategory) Get ¶
func (instance *CWSettingsEditorialPlanCategory) Get() (headers []*CWHeader)
func (*CWSettingsEditorialPlanCategory) GetRnd ¶
func (instance *CWSettingsEditorialPlanCategory) GetRnd() (header *CWHeader)
type CWSettingsEditorialPlanSpecial ¶
type CWSettingsEditorialPlanSpecial struct { Uid string `json:"uid"` Date string `json:"date"` Category string `json:"category"` TxtPrompt *CWSettingsPrompt `json:"txt-prompt"` }
func (*CWSettingsEditorialPlanSpecial) IsNow ¶
func (instance *CWSettingsEditorialPlanSpecial) IsNow() bool
func (*CWSettingsEditorialPlanSpecial) String ¶
func (instance *CWSettingsEditorialPlanSpecial) String() string
type CWSettingsProducers ¶
type CWSettingsProducers struct { ProducerText *CWSettingsPublishingProducerText `json:"producer_text,omitempty"` ProducerImage *CWSettingsPublishingProducerImage `json:"producer_image,omitempty"` Localization *CWSettingsPublishingLocalization `json:"localization,omitempty"` }
type CWSettingsPrompt ¶
type CWSettingsPrompt struct { Title string `json:"title"` Content string `json:"content"` Params []string `json:"params"` Mode string `json:"mode"` // "all", "one }
func (*CWSettingsPrompt) Get ¶
func (instance *CWSettingsPrompt) Get() (headers []*CWHeader)
func (*CWSettingsPrompt) GetAll ¶
func (instance *CWSettingsPrompt) GetAll() (headers []*CWHeader)
func (*CWSettingsPrompt) GetRnd ¶
func (instance *CWSettingsPrompt) GetRnd() (header *CWHeader)
type CWSettingsPublishing ¶
type CWSettingsPublishing struct {
Targets []*CWSettingsPublishingTarget `json:"targets,omitempty"`
}
type CWSettingsPublishingProducerImage ¶
type CWSettingsPublishingProducerImage struct {
*commons.SettingsExternal
}
type CWSettingsPublishingProducerText ¶
type CWSettingsPublishingProducerText struct {
*commons.SettingsExternal
}
type CWSettingsPublishingTarget ¶
type CWSettingsPublishingTarget struct {
*commons.SettingsExternal
}
type CWSettingsScheduler ¶
type CWSettingsScheduler struct {
Timers *gg_scheduler.SchedulerSettings `json:"timers"`
}
Click to show internal directories.
Click to hide internal directories.