-
Notifications
You must be signed in to change notification settings - Fork 7
/
post.go
33 lines (29 loc) · 1.03 KB
/
post.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package ButterCMS
import (
"time"
)
type PostStatus string
const (
PostStatusDraft PostStatus = "draft"
PostStatusPublished PostStatus = "published"
PostStatusScheduled PostStatus = "scheduled"
)
type Post struct {
URL string `json:"url"`
Created *time.Time `json:"created"`
Published *time.Time `json:"published"`
Author Author `json:"author"`
CategoryList []Category `json:"categories"`
TagList []Tag `json:"tags"`
FeaturedImage string `json:"featured_image"`
FeaturedImageAlt string `json:"featured_image_alt"`
Slug string `json:"slug"`
Title string `json:"title"`
Body string `json:"body"`
Summary string `json:"summary"`
SEOTitle string `json:"seo_title"`
MetaDescription string `json:"meta_description"`
Status PostStatus `json:"status"`
Updated *time.Time `json:"updated,omitempty"`
Scheduled *time.Time `json:"scheduled,omitempty"`
}