Documentation ¶
Index ¶
- type HttpHelper
- func (c *HttpHelper) Body(body map[string]any) *HttpHelper
- func (c *HttpHelper) Data() (map[string]any, error)
- func (c *HttpHelper) ExtractInto(to any) error
- func (c *HttpHelper) Filter(filter *filters.JsonFilter) *HttpHelper
- func (c *HttpHelper) Headers(headers map[string]string) *HttpHelper
- func (c *HttpHelper) LinkPager(dataPath, linkExp string) *HttpHelper
- func (c *HttpHelper) MarkerPager(dataPath, nextExp, markerKey string) *HttpHelper
- func (c *HttpHelper) Method(method string) *HttpHelper
- func (c *HttpHelper) OffsetPager(dataPath, offsetKey, limitKey string, defaultLimit int) *HttpHelper
- func (c *HttpHelper) OffsetStart(offsetStart int) *HttpHelper
- func (c *HttpHelper) OkCode(okCodes ...int) *HttpHelper
- func (c *HttpHelper) PageSizePager(dataPath, pageNumKey, perPageKey string, perPage int) *HttpHelper
- func (c *HttpHelper) Query(query map[string]any) *HttpHelper
- func (c *HttpHelper) Request() *HttpHelper
- func (c *HttpHelper) Result() (*gjson.Result, error)
- func (c *HttpHelper) URI(url string) *HttpHelper
- type LinkPager
- type MarkerPager
- type OffsetPager
- type PageSizePager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpHelper ¶
type HttpHelper struct {
// contains filtered or unexported fields
}
func New ¶
func New(client *golangsdk.ServiceClient) *HttpHelper
func (*HttpHelper) Body ¶
func (c *HttpHelper) Body(body map[string]any) *HttpHelper
func (*HttpHelper) ExtractInto ¶
func (c *HttpHelper) ExtractInto(to any) error
func (*HttpHelper) Filter ¶
func (c *HttpHelper) Filter(filter *filters.JsonFilter) *HttpHelper
func (*HttpHelper) Headers ¶
func (c *HttpHelper) Headers(headers map[string]string) *HttpHelper
func (*HttpHelper) LinkPager ¶
func (c *HttpHelper) LinkPager(dataPath, linkExp string) *HttpHelper
func (*HttpHelper) MarkerPager ¶
func (c *HttpHelper) MarkerPager(dataPath, nextExp, markerKey string) *HttpHelper
func (*HttpHelper) Method ¶
func (c *HttpHelper) Method(method string) *HttpHelper
func (*HttpHelper) OffsetPager ¶
func (c *HttpHelper) OffsetPager(dataPath, offsetKey, limitKey string, defaultLimit int) *HttpHelper
func (*HttpHelper) OffsetStart ¶ added in v1.64.0
func (c *HttpHelper) OffsetStart(offsetStart int) *HttpHelper
OffsetStart set the default value of offset. Note: must be executed before setting pager.
func (*HttpHelper) OkCode ¶
func (c *HttpHelper) OkCode(okCodes ...int) *HttpHelper
func (*HttpHelper) PageSizePager ¶
func (c *HttpHelper) PageSizePager(dataPath, pageNumKey, perPageKey string, perPage int) *HttpHelper
func (*HttpHelper) Query ¶
func (c *HttpHelper) Query(query map[string]any) *HttpHelper
func (*HttpHelper) Request ¶
func (c *HttpHelper) Request() *HttpHelper
func (*HttpHelper) URI ¶
func (c *HttpHelper) URI(url string) *HttpHelper
type LinkPager ¶
type LinkPager struct { pagination.LinkedPageBase DataPath string LinkExp string // contains filtered or unexported fields }
func (LinkPager) NextPageURL ¶
NextPageURL uses the response's embedded link reference to navigate to the next page of results.
type MarkerPager ¶
type MarkerPager struct { pagination.MarkerPageBase DataPath string MarkerKey string NextExp string // contains filtered or unexported fields }
func (MarkerPager) IsEmpty ¶
func (p MarkerPager) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult no association.
func (MarkerPager) LastMarker ¶
func (p MarkerPager) LastMarker() (string, error)
LastMarker returns the last marker index in a ListResult.
func (MarkerPager) NextPageURL ¶
func (p MarkerPager) NextPageURL() (string, error)
type OffsetPager ¶
type OffsetPager struct { pagination.OffsetPageBase DataPath string DefaultLimit int OffsetKey string LimitKey string // contains filtered or unexported fields }
func (OffsetPager) DataCount ¶
func (p OffsetPager) DataCount() (int, error)
func (OffsetPager) IsEmpty ¶
func (p OffsetPager) IsEmpty() (bool, error)
IsEmpty checks whether a PolicyPage struct is empty.
func (OffsetPager) NextOffset ¶
func (p OffsetPager) NextOffset() int
func (OffsetPager) NextPageURL ¶
func (p OffsetPager) NextPageURL() (string, error)
NextPageURL generates the URL for the page of results after this one.
type PageSizePager ¶
type PageSizePager struct { pagination.OffsetPageBase DataPath string PageNumKey string PerPageKey string // contains filtered or unexported fields }
func (PageSizePager) CurrentPageNum ¶
func (p PageSizePager) CurrentPageNum() int
NextOffset returns offset of the next element of the page.
func (PageSizePager) IsEmpty ¶
func (p PageSizePager) IsEmpty() (bool, error)
IsEmpty determines whether or not a page of Roles contains any results.
func (PageSizePager) NextPageURL ¶
func (p PageSizePager) NextPageURL() (string, error)
NextPageURL generates the URL for the page of results after this one.
Click to show internal directories.
Click to hide internal directories.