blargh: Index | Files

package post

import ""


Package Files

post.go post_list.go set.go time.go


const TimeFormat = "02 Jan 2006 15:04 MST"

type Post Uses

type Post struct {
    Id, Author                         string
    Title, Category, Description, Body string
    HTML                               T.HTML
    Published                          bool
    Slugs, Terms, Tags                 []string
    PublishedOn                        *Time
    UpdatedAt                          *Time
    Images                             map[string]map[string]string

func FromFile Uses

func FromFile(path string) (*Post, error)

func (*Post) Clean Uses

func (p *Post) Clean() string

func (*Post) HasSlug Uses

func (p *Post) HasSlug(slug string) bool

func (*Post) InMonth Uses

func (p *Post) InMonth(month time.Month) bool

func (*Post) InYear Uses

func (p *Post) InYear(year int) bool

func (*Post) OnDay Uses

func (p *Post) OnDay(year int, month time.Month, day int) bool

func (*Post) Slug Uses

func (p *Post) Slug() string

type PostList Uses

type PostList []*Post

func (PostList) Len Uses

func (pl PostList) Len() int

func (PostList) Less Uses

func (pl PostList) Less(i, j int) bool

func (PostList) PublishedBefore Uses

func (pl PostList) PublishedBefore(t time.Time) PostList

Assumes the list is sorted given the above functions already.

func (PostList) Swap Uses

func (pl PostList) Swap(i, j int)

type PostSet Uses

type PostSet struct {
    // contains filtered or unexported fields

func NewPostSet Uses

func NewPostSet() *PostSet

func (*PostSet) Add Uses

func (ps *PostSet) Add(p *Post)

func (*PostSet) AddSet Uses

func (ps *PostSet) AddSet(other *PostSet)

func (*PostSet) Contains Uses

func (ps *PostSet) Contains(p *Post) bool

func (*PostSet) Intersection Uses

func (ps *PostSet) Intersection(other *PostSet) *PostSet

func (*PostSet) Len Uses

func (ps *PostSet) Len() int

func (*PostSet) Values Uses

func (ps *PostSet) Values() PostList

type Time Uses

type Time struct {

func (*Time) SetYAML Uses

func (t *Time) SetYAML(tag string, value interface{}) bool

Package post imports 12 packages (graph) and is imported by 4 packages. Updated 2016-07-30. Refresh now. Tools for package owners.