Documentation ¶
Index ¶
- type Client
- func (c *Client) AuthToken() string
- func (c *Client) Cache() headless_cms.Cache
- func (c *Client) CacheKey(prefix, page, version, language string) string
- func (c *Client) EmptyCache(ctx context.Context, token string) error
- func (c *Client) EmptyCacheToken(ctx context.Context) (string, error)
- func (c *Client) GetPage(ctx context.Context, page string, version string, language string) (map[string]any, error)
- func (c *Client) GetPageAsJSON(ctx context.Context, page string, version string, language string) ([]byte, error)
- func (c *Client) GetPageAsSimpleBlocksWithID(ctx context.Context, page string, version string, language string) (map[string]map[string]any, error)
- type Content
- type HTTPClient
- type SimpleBlockskWithID
- type Story
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HttpClient HTTPClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ctx context.Context, token string, emptyCacheToken string, cache headless_cms.Cache, httpClient HTTPClient) *Client
func (*Client) Cache ¶
func (c *Client) Cache() headless_cms.Cache
func (*Client) EmptyCacheToken ¶
type SimpleBlockskWithID ¶
type Story ¶
type Story struct { Name string `json:"name"` CreatedAt time.Time `json:"created_at"` PublishedAt time.Time `json:"published_at"` ID int `json:"id"` UUID string `json:"uuid"` Content Content `json:"content"` Slug string `json:"slug"` FullSlug string `json:"full_slug"` SortByDate interface{} `json:"sort_by_date"` Position int `json:"position"` TagList []interface{} `json:"tag_list"` IsStartpage bool `json:"is_startpage"` ParentID interface{} `json:"parent_id"` MetaData interface{} `json:"meta_data"` GroupID string `json:"group_id"` FirstPublishedAt time.Time `json:"first_published_at"` ReleaseID interface{} `json:"release_id"` Lang string `json:"lang"` Path interface{} `json:"path"` Alternates []interface{} `json:"alternates"` DefaultFullSlug interface{} `json:"default_full_slug"` TranslatedSlugs interface{} `json:"translated_slugs"` }
Click to show internal directories.
Click to hide internal directories.