Documentation ¶
Index ¶
- func CreateJWT() (string, error)
- func CreateJWTX() string
- func ReplaceMobileDoc(mobiledoc string, newMobiledoc string) string
- func SetRequestHeadersForGhost(req *http.Request)
- type Entity
- type Errors
- type GhostSite
- type PageEntity
- type PostEntity
- type RequestError
- type RequestErrorDetails
- type SingleRessource
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJWTX ¶
func CreateJWTX() string
func ReplaceMobileDoc ¶
Types ¶
type Entity ¶
type Entity interface { Request() PageEntity }
type Errors ¶
type Errors struct {
GhostError []RequestError `json:"errors"`
}
type GhostSite ¶
type GhostSite struct { Site struct { Title string `json:"title"` Description string `json:"description,omitempty"` Logo string `json:"logo,omitempty"` Icon string `json:"icon,omitempty"` AccentColor string `json:"accent_color,omitempty"` Locale string `json:"locale,omitempty"` URL string `json:"url,omitempty"` Version string `json:"version,omitempty"` } `json:"site"` }
func RequestSite ¶
type PageEntity ¶
type PageEntity struct {
Pages []SingleRessource `json:"pages"`
}
func (PageEntity) Request ¶
func (gp PageEntity) Request() error
func (PageEntity) UpdatePage ¶
func (gp PageEntity) UpdatePage() error
type PostEntity ¶
type PostEntity struct {
Posts []SingleRessource `json:"posts"`
}
func (PostEntity) Request ¶
func (gp PostEntity) Request() error
func (PostEntity) UpdatePost ¶
func (gp PostEntity) UpdatePost() error
type RequestError ¶
type RequestError struct { Message string `json:"message"` Context string `json:"context,omitempty"` Type string `json:"type"` Details []RequestErrorDetails `json:"details,omitempty"` Property string `json:"property,omitempty"` Help string `json:"help,omitempty"` Code string `json:"code,omitempty"` Id string `json:"id"` GhostErrorCode string `json:"ghostErrorCode,omitempty"` }
type RequestErrorDetails ¶
type SingleRessource ¶
type SingleRessource struct { ID string `json:"id"` Title string `json:"title"` Slug string `json:"slug,omitempty"` UpdatedAt string `json:"updated_at"` PublishedAt string `json:"published_at"` MobileDoc string `json:"mobiledoc,omitempty"` HTML string `json:"html,omitempty"` Status string `json:"status,omitempty"` Featured bool `json:"featured,omitempty"` Excerpt string `json:"custom_excerpt,omitempty"` Tags []Tag `json:"tags,omitempty"` }
Click to show internal directories.
Click to hide internal directories.