mirror of
https://github.com/mainnika/nikita-tokarch-uk.git
synced 2026-05-25 01:03:35 +00:00
Add ghost client interface
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
package ghost
|
||||||
|
|
||||||
|
// Pages are ghost pages data
|
||||||
|
type Pages struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Posts are ghost posts data
|
||||||
|
type Posts struct {
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package ghost
|
||||||
|
|
||||||
|
// Client is the ghost backend client
|
||||||
|
type Client interface {
|
||||||
|
GetPosts(params ...QueryParam) (posts *Posts, err error)
|
||||||
|
GetPostBySlug(slug string, params ...QueryParam) (posts *Posts, err error)
|
||||||
|
GetPageBySlug(slug string) (pages *Pages, err error)
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package ghost
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/valyala/fasthttp"
|
||||||
|
)
|
||||||
|
|
||||||
|
// QueryParam is the generic query param applier
|
||||||
|
type QueryParam interface {
|
||||||
|
Apply(headers *fasthttp.RequestHeader, args *fasthttp.Args)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user