Documentation ¶
Index ¶
- Constants
- type Ghost
- func (g *Ghost) AdminCreateMember(member NewMember) (Members, error)
- func (g *Ghost) AdminCreatePost(post Post) (Posts, error)
- func (g *Ghost) AdminCreateTags(tags NewTags) error
- func (g *Ghost) AdminDeleteTag(tag Tag) error
- func (g *Ghost) AdminGetMembers() (Members, error)
- func (g *Ghost) AdminGetPosts() (Posts, error)
- func (g *Ghost) AdminGetPostsByTag(tag string) (Posts, error)
- func (g *Ghost) AdminGetTags() (Tags, error)
- func (g *Ghost) AdminUpdatePost(post Post) error
- func (g *Ghost) AdminUpdateTag(tag Tag) error
- func (g *Ghost) AdminUploadImage(path string) (imageURL string, err error)
- func (g *Ghost) GetPages() (Pages, error)
- func (g *Ghost) GetPosts() (Posts, error)
- func (g *Ghost) GetPostsByTag(tag string) (Posts, error)
- type Image
- type ImageResponse
- type Member
- type Members
- type NewMember
- type NewMembers
- type NewTag
- type NewTags
- type Page
- type Pages
- type Post
- type Posts
- type Subscription
- type Tag
- type Tags
Constants ¶
View Source
const StatusPublished = "published"
StatusPublished indicates if a post or pages is already published
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ghost ¶
type Ghost struct {
// contains filtered or unexported fields
}
func (*Ghost) AdminCreateMember ¶
func (*Ghost) AdminCreateTags ¶
func (*Ghost) AdminDeleteTag ¶
func (*Ghost) AdminGetMembers ¶
func (*Ghost) AdminGetPosts ¶
func (*Ghost) AdminGetTags ¶
func (*Ghost) AdminUpdatePost ¶
func (*Ghost) AdminUpdateTag ¶
func (*Ghost) AdminUploadImage ¶
AdminUploadImage - Creates a new file upload http request
type ImageResponse ¶
type ImageResponse struct {
Images []Image
}
type Member ¶
type Member struct { Id string `json:"id"` Uuid string `json:"uuid"` Email string `json:"email"` Name string `json:"name"` Note interface{} `json:"note"` Geolocation interface{} `json:"geolocation"` Subscribed bool `json:"subscribed"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Labels []struct { Id string `json:"id"` Name string `json:"name"` Slug string `json:"slug"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } `json:"labels"` Subscriptions []Subscription `json:"subscriptions"` AvatarImage string `json:"avatar_image"` EmailCount int `json:"email_count"` EmailOpenedCount int `json:"email_opened_count"` EmailOpenRate float64 `json:"email_open_rate"` Status string `json:"status"` }
type NewMembers ¶
type NewMembers struct {
Members []NewMember `json:"members"`
}
type NewTag ¶
type NewTag struct { CreatedAt time.Time `json:"created_at,omitempty"` Description string `json:"description,omitempty"` FeatureImage string `json:"feature_image,omitempty"` Id string `json:"id,omitempty"` MetaDescription string `json:"meta_description,omitempty"` MetaTitle string `json:"meta_title,omitempty"` Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Url string `json:"url,omitempty"` Visibility string `json:"visibility,omitempty"` TwitterImage string `json:"twitter_image,omitempty"` TwitterTitle string `json:"twitter_title,omitempty"` TwitterDescription string `json:"twitter_description,omitempty"` CodeInjectionHead string `json:"codeinjection_head,omitempty"` CodeInjectionFoot string `json:"codeinjection_foot,omitempty"` CanonicalURL string `json:"canonical_url,omitempty"` AccentColor string `json:"accent_color,omitempty"` }
NewTag - two struct because field "Count" must not exist when creating a new tag
type Page ¶
type Page struct { ID string `json:"id,omitempty"` UUID string `json:"uuid,omitempty"` Title string `json:"title,omitempty"` MobileDoc string `json:"mobiledoc"` Slug string `json:"slug,omitempty"` HTML string `json:"html,omitempty"` CommentID string `json:"comment_id,omitempty"` FeatureImage string `json:"feature_image,omitempty"` Featured bool `json:"featured,omitempty"` Page bool `json:"page,omitempty"` MetaTitle string `json:"meta_title,omitempty"` MetaDescription string `json:"meta_description,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` PublishedAt string `json:"published_at,omitempty"` CustomExcerpt string `json:"custom_excerpt,omitempty"` OGImage string `json:"og_image,omitempty"` OGTitle string `json:"og_title,omitempty"` OGDescription string `json:"og_description,omitempty"` TwitterImage string `json:"twitter_image,omitempty"` TwitterTitle string `json:"twitter_title,omitempty"` TwitterDescription string `json:"twitter_description,omitempty"` CustomTemplate string `json:"custom_template,omitempty"` URL string `json:"url,omitempty"` Excerpt string `json:"excerpt,omitempty"` }
type Post ¶
type Post struct { ID string `json:"id,omitempty"` UUID string `json:"uuid,omitempty"` Title string `json:"title,omitempty"` MobileDoc string `json:"mobiledoc,omitempty"` Slug string `json:"slug,omitempty"` HTML string `json:"html,omitempty"` CommentID string `json:"comment_id,omitempty"` FeatureImage string `json:"feature_image,omitempty"` Featured bool `json:"featured,omitempty"` Page bool `json:"page,omitempty"` MetaTitle string `json:"meta_title,omitempty"` MetaDescription string `json:"meta_description,omitempty"` CreatedAt string `json:"created_at,omitempty"` // "2022-01-05T22:39:28.000Z" UpdatedAt string `json:"updated_at,omitempty"` // "2022-04-02T16:01:24.000Z" PublishedAt string `json:"published_at,omitempty"` // "2022-01-19T06:31:00.000Z" CustomExcerpt string `json:"custom_excerpt,omitempty"` OGImage string `json:"og_image,omitempty"` OGTitle string `json:"og_title,omitempty"` OGDescription string `json:"og_description,omitempty"` TwitterImage string `json:"twitter_image,omitempty"` TwitterTitle string `json:"twitter_title,omitempty"` TwitterDescription string `json:"twitter_description,omitempty"` CustomTemplate string `json:"custom_template,omitempty"` URL string `json:"url,omitempty"` Excerpt string `json:"excerpt,omitempty"` Tags []Tag `json:"tags,omitempty"` Status string `json:"status,omitempty"` // "published" Visibility string `json:"visibility,omitempty"` // "public" }
type Subscription ¶
type Subscription struct { Id string `json:"id"` Customer struct { Id string `json:"id"` Name string `json:"name"` Email string `json:"email"` } `json:"customer"` Status string `json:"status"` StartDate time.Time `json:"start_date"` DefaultPaymentCardLast4 string `json:"default_payment_card_last4"` CancelAtPeriodEnd bool `json:"cancel_at_period_end"` CancellationReason string `json:"cancellation_reason"` CurrentPeriodEnd time.Time `json:"current_period_end"` Price struct { Id string `json:"id"` PriceId string `json:"price_id"` Nickname string `json:"nickname"` Amount int `json:"amount"` Interval string `json:"interval"` Type string `json:"type"` Currency string `json:"currency"` } `json:"price"` }
type Tag ¶
type Tag struct { CreatedAt time.Time `json:"created_at,omitempty"` Description string `json:"description,omitempty"` FeatureImage string `json:"feature_image,omitempty"` Id string `json:"id,omitempty"` MetaDescription string `json:"meta_description,omitempty"` MetaTitle string `json:"meta_title,omitempty"` Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Url string `json:"url,omitempty"` Visibility string `json:"visibility,omitempty"` TwitterImage string `json:"twitter_image,omitempty"` TwitterTitle string `json:"twitter_title,omitempty"` TwitterDescription string `json:"twitter_description,omitempty"` CodeInjectionHead string `json:"codeinjection_head,omitempty"` CodeInjectionFoot string `json:"codeinjection_foot,omitempty"` CanonicalURL string `json:"canonical_url,omitempty"` AccentColor string `json:"accent_color,omitempty"` Count struct { Posts int `json:"posts,omitempty"` } `json:"count,omitempty,skip"` }
Click to show internal directories.
Click to hide internal directories.