liquidweb.go raw
1 package liquidweb
2
3 import (
4 "github.com/liquidweb/liquidweb-go/types"
5 )
6
7 // Backend is an interface for calls against Liquid Web's API.
8 type Backend interface {
9 CallIntoInterface(string, interface{}, interface{}) error
10 CallRaw(string, interface{}) ([]byte, error)
11 }
12
13 // ListMeta handles Liquid Web's pagination in HTTP responses.
14 type ListMeta struct {
15 ItemCount types.FlexInt `json:"item_count,omitempty"`
16 ItemTotal types.FlexInt `json:"item_total,omitempty"`
17 PageNum types.FlexInt `json:"page_num,omitempty"`
18 PageSize types.FlexInt `json:"page_size,omitempty"`
19 PageTotal types.FlexInt `json:"page_total,omitempty"`
20 }
21
22 // PageParams support pagination parameters in parameter types.
23 type PageParams struct {
24 PageNum types.FlexInt `json:"page_num,omitempty"`
25 PageSize types.FlexInt `json:"page_size,omitempty"`
26 }
27