sites

package
v0.0.0-...-63319d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *golangsdk.ServiceClient, opts ListSiteOptsBuilder) pagination.Pager

List returns a Pager which allows you to iterate over a collection of sites. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.

func ListURL

func ListURL(sc *golangsdk.ServiceClient) string

Types

type ListSiteOpts

type ListSiteOpts struct {
	//Limit query limit
	Limit string `q:"limit"`

	//Offset query begin index
	Offset string `q:"offset"`

	//id query by id
	ID string `q:"id"`

	//Area query by area
	Area string `q:"area"`

	//Province query by province
	Province string `q:"province"`

	//City query by city
	City string `q:"city"`

	//Operator query by operator
	Operator string `q:"operator"`
}

ListSiteOpts to list site

func (ListSiteOpts) ToListSiteQuery

func (opts ListSiteOpts) ToListSiteQuery() (string, error)

ToListSiteQuery converts ListSiteOpts structures to query string

type ListSiteOptsBuilder

type ListSiteOptsBuilder interface {
	ToListSiteQuery() (string, error)
}

ListSiteOptsBuilder list sites builder

type SitePage

type SitePage struct {
	pagination.LinkedPageBase
}

SitePage is the page returned by a pager when traversing over a collection of sites.

func (SitePage) IsEmpty

func (r SitePage) IsEmpty() (bool, error)

IsEmpty returns true if a page contains no site results.

type Sites

type Sites struct {
	// 数量
	Count int32 `json:"count"`

	Sites []common.Site `json:"sites"`
}

Sites 站点集合

func ExtractSites

func ExtractSites(r pagination.Page) (Sites, error)

ExtractSites interprets the results of a single page from a List() call, producing a slice of site entities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL