You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
920 B
45 lines
920 B
3 years ago
|
package data
|
||
|
|
||
|
//go:generate $GOPATH/bin/easyjson -pkg -no_std_marshalers
|
||
3 years ago
|
|
||
3 years ago
|
import "html/template"
|
||
|
|
||
3 years ago
|
// Pages are ghost pages data
|
||
3 years ago
|
//easyjson:json
|
||
3 years ago
|
type Pages struct {
|
||
3 years ago
|
Pages []Post `json:"pages"`
|
||
|
Meta Meta `json:"meta"`
|
||
|
}
|
||
|
|
||
|
// Post contains ghost post data
|
||
3 years ago
|
//easyjson:json
|
||
3 years ago
|
type Post struct {
|
||
|
ID string `json:"id"`
|
||
|
UUID string `json:"uuid"`
|
||
|
Title string `json:"title"`
|
||
|
HTML template.HTML `json:"html"`
|
||
|
FImage template.URL `json:"feature_image"`
|
||
|
}
|
||
|
|
||
|
// Meta contains ghost result metadata
|
||
3 years ago
|
//easyjson:json
|
||
3 years ago
|
type Meta struct {
|
||
|
Pagination Pagination `json:"pagination"`
|
||
|
}
|
||
|
|
||
|
// Pagination contains ghost pagination data
|
||
3 years ago
|
//easyjson:json
|
||
3 years ago
|
type Pagination struct {
|
||
|
Page int `json:"page"`
|
||
|
Limit int `json:"limit"`
|
||
|
Pages int `json:"pages"`
|
||
|
Total int `json:"total"`
|
||
3 years ago
|
}
|
||
|
|
||
|
// Posts are ghost posts data
|
||
3 years ago
|
//easyjson:json
|
||
3 years ago
|
type Posts struct {
|
||
3 years ago
|
Posts []Post `json:"posts"`
|
||
|
Meta Meta `json:"meta"`
|
||
3 years ago
|
}
|