tmodels

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CWArticle

type CWArticle struct {
	Lang         string               `json:"lang"`
	Title        string               `json:"title"`
	Content      string               `json:"content"`
	Excerpt      string               `json:"excerpt"`
	CreationDate string               `json:"creation_date"`
	Keywords     []string             `json:"keywords"`
	Tags         []string             `json:"tags"` // get from plan category
	Categories   []*CWArticleCategory `json:"category"`
	Image        *CWArticleImage      `json:"image"`
}

func (*CWArticle) CategoryAdd

func (instance *CWArticle) CategoryAdd(category *CWArticleCategory) *CWArticle

func (*CWArticle) CategoryExists

func (instance *CWArticle) CategoryExists(uid string) bool

func (*CWArticle) String

func (instance *CWArticle) String() string

type CWArticleCategory

type CWArticleCategory struct {
	Uid         string   `json:"uid"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Hashtags    []string `json:"hashtags"`
}

func (*CWArticleCategory) String

func (instance *CWArticleCategory) String() string

type CWArticleImage

type CWArticleImage struct {
	Uid         string                     `json:"uid"`
	Name        string                     `json:"name"`
	Description string                     `json:"description"`
	Data        []byte                     `json:"data"`
	Attribution *CWArticleImageAttribution `json:"attribution"`
}

func NewCWArticleImageFromProducerItem

func NewCWArticleImageFromProducerItem(item *model.ProducerItem) *CWArticleImage

func (*CWArticleImage) String

func (instance *CWArticleImage) String() string

type CWArticleImageAttribution

type CWArticleImageAttribution struct {
	AuthorName string `json:"author_name"`
	AuthorLink string `json:"author_link"`
	SourceName string `json:"source_name"`
	SourceLink string `json:"source_link"`
	ImageLink  string `json:"image_link"`
}

CWArticleImageAttribution ex: "Photo by Patrick Tomasso on Unsplash"

func (*CWArticleImageAttribution) AttributionHtml

func (instance *CWArticleImageAttribution) AttributionHtml() string

func (*CWArticleImageAttribution) AttributionTxt

func (instance *CWArticleImageAttribution) AttributionTxt() string

func (*CWArticleImageAttribution) String

func (instance *CWArticleImageAttribution) String() string

Jump to

Keyboard shortcuts

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