-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathliquidweb.go
More file actions
26 lines (22 loc) · 827 Bytes
/
liquidweb.go
File metadata and controls
26 lines (22 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package liquidweb
import (
"github.com/liquidweb/liquidweb-go/types"
)
// Backend is an interface for calls against Liquid Web's API.
type Backend interface {
CallIntoInterface(string, interface{}, interface{}) error
CallRaw(string, interface{}) ([]byte, error)
}
// ListMeta handles Liquid Web's pagination in HTTP responses.
type ListMeta struct {
ItemCount types.FlexInt `json:"item_count,omitempty"`
ItemTotal types.FlexInt `json:"item_total,omitempty"`
PageNum types.FlexInt `json:"page_num,omitempty"`
PageSize types.FlexInt `json:"page_size,omitempty"`
PageTotal types.FlexInt `json:"page_total,omitempty"`
}
// PageParams support pagination parameters in parameter types.
type PageParams struct {
PageNum types.FlexInt `json:"page_num,omitempty"`
PageSize types.FlexInt `json:"page_size,omitempty"`
}