cms

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	core.Model
	UserID uint      `sql:"not null"  json:"user_id"`
	User   auth.User `json:"-"`

	Aid     string `sql:"not null;type:varchar(36);unique_index"  json:"aid"`
	Title   string `sql:"not null" json:"title"`
	Summary string `sql:"not null" json:"summary"`
	Body    string `sql:"not null;type:TEXT"  json:"body"`
	Type    string `sql:"not null;type:varchar(8);default:'markdown';index"  json:"type"`
	Lang    string `sql:"not null;type:char(5);index;default:'en-US'" json:"lang"`

	Tags []Tag `gorm:"many2many:cms_article_tags;" json:"tags"`
}

func (Article) TableName

func (Article) TableName() string

type Attachment

type Attachment struct {
	core.Model
	UserID uint   `sql:"not null" json:"-"`
	User   User   `json:"-"`
	Url    string `sql:"not null;unique_index" json:"url"`
	Title  string `sql:"not null;index" json:"title"`
	Size   uint   `sql:"not null" json:"size"`
	Type   string `sql:"not null;index" json:"type"`
}

func (*Attachment) Ext

func (p *Attachment) Ext() string

func (*Attachment) IsPicture

func (p *Attachment) IsPicture() bool

func (*Attachment) SizeS

func (p *Attachment) SizeS() string

type Book

type Book struct {
	core.Model
	Type      string `sql:"not null;index" json:"type"`
	Name      string `sql:"not null;unique_index" json:"name"`
	IndexHref string `json:"index_href"`
	IndexType string `json:"index_type"`
	CoverHref string `json:"cover_href"`
	CoverType string `json:"cover_type"`

	Title      string `sql:"not null;index" json:"title"`
	Author     string `sql:"not null;index" json:"author"`
	Language   string `json:"language"`
	Identifier string `json:"identifier"`
	Subject    string `json:"subject"`
	Publisher  string `json:"publisher"`
	Date       string `json:"date"`
}

func (Book) TableName

func (Book) TableName() string

type Channel

type Channel struct {
	core.Model

	Uid         string `sql:"not null;index" json:"uid"`
	Cid         string `sql:"not null;index" json:"cid"`
	Type        string `sql:"not null;type:varchar(8);index" json:"type"`
	Title       string `sql:"not null" json:"title"`
	Description string `sql:"not null;type:text" json:"description"`
}

func (Channel) TableName

func (Channel) TableName() string

type CmsEngine

type CmsEngine struct {
	core.Controller

	Render  *render.Render   `inject:""`
	Db      *gorm.DB         `inject:""`
	Logger  *logging.Logger  `inject:""`
	Cache   cache.Provider   `inject:""`
	Session *auth.Session    `inject:""`
	AuthDao *auth.Dao        `inject:""`
	Storage storage.Provider `inject:""`
	SiteDao *site.Dao        `inject:""`
}

func (*CmsEngine) Asserts

func (p *CmsEngine) Asserts() []*core.Template

func (*CmsEngine) Migrate

func (p *CmsEngine) Migrate()

-----------------------------------------------------------------------------

func (*CmsEngine) Mount

func (p *CmsEngine) Mount(rt core.Router)

func (*CmsEngine) Rss

func (p *CmsEngine) Rss() rss.Handler

func (*CmsEngine) Seed

func (p *CmsEngine) Seed() error

func (*CmsEngine) Shell

func (p *CmsEngine) Shell() []cli.Command

func (*CmsEngine) Sitemap

func (p *CmsEngine) Sitemap() sitemap.Handler

type Comment

type Comment struct {
	core.Model
	UserID uint `sql:"not null"`
	User   auth.User

	Body string `sql:"not null;type:TEXT"`
	Type string `sql:"not null;type:varchar(8);default:'markdown';index"`
}

func (Comment) TableName

func (Comment) TableName() string

type Playlist

type Playlist struct {
	core.Model
	Cid         string `sql:"not null;index" json:"cid"`
	Pid         string `sql:"not null;index" json:"pid"`
	Type        string `sql:"not null;type:varchar(8);index" json:"type"`
	Title       string `sql:"not null" json:"title"`
	Description string `sql:"not null;type:text" json:"description"`
}

func (Playlist) TableName

func (Playlist) TableName() string

type Tag

type Tag struct {
	core.Model
	Name     string    `sql:"not null;unique" json:"name"`
	Articles []Article `gorm:"many2many:cms_article_tags;"  json:"articles"`
}

func (Tag) TableName

func (Tag) TableName() string

type User

type User struct {
	core.Model

	Uid  string `sql:"not null;index"`
	Lang string `sql:"not null;type:char(5);index;default:'en-US'"`
	Type string `sql:"not null;type:varchar(8);index"`
}

func (User) String

func (p User) String() string

func (User) TableName

func (User) TableName() string

type Video

type Video struct {
	core.Model

	Pid         string `sql:"not null;index" json:"pid"`
	Vid         string `sql:"not null;index" json:"vid"`
	Type        string `sql:"not null;type:varchar(8);index" json:"type"`
	Title       string `sql:"not null" json:"title"`
	Description string `sql:"not null;type:text" json:"description"`
}

func (Video) TableName

func (Video) TableName() string

type YTChannel

type YTChannel struct {
	Id      string       `json:"id"`
	Page    YTPageInfo   `json:"pageInfo"`
	Snippet YTSnippet    `json:"snippet"`
	Items   []YTPlaylist `json:"items"`
}

type YTPageInfo

type YTPageInfo struct {
	TotalResults   int `json:"totalResults"`
	ResultsPerPage int `json:"resultsPerPage"`
}

type YTPlaylist

type YTPlaylist struct {
	Id      string     `json:"id"`
	Page    YTPageInfo `json:"pageInfo"`
	Snippet YTSnippet  `json:"snippet"`
	Items   []YTVideo  `json:"items"`
}

type YTSnippet

type YTSnippet struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

type YTUser

type YTUser struct {
	Page  YTPageInfo  `json:"pageInfo"`
	Items []YTChannel `json:"items"`
}

type YTVideo

type YTVideo struct {
	Id      string     `json:"id"`
	Page    YTPageInfo `json:"pageInfo"`
	Snippet YTSnippet  `json:"snippet"`
}

Jump to

Keyboard shortcuts

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