shop

package
v0.0.0-...-5652a87 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListResult

type ListResult struct {
	PageIndex int `json:"pageindex"` // 分页下标
	PageCount int `json:"pagecount"` // 分页页数

	TotalCount int `json:"totalcount"` // 总数
	ItemCount  int `json:"itemcount"`  // 当前页列表大小

	Records []Shop `json:"records"` // 当前页列表数组
}

func List

func List(clt *mp.Client, pageIndex, pageSize int) (rslt *ListResult, err error)

获取WiFi门店列表.

pageIndex: 分页下标,默认从1开始
pageSize:  每页的个数,默认10个,最大20个

type Shop

type Shop struct {
	Id           int64  `json:"shop_id"`       // 门店ID
	Name         string `json:"shop_name"`     // 门店名称
	SSID         string `json:"ssid"`          // 无线网络设备的ssid,未添加设备为空
	ProtocolType int    `json:"protocol_type"` // 门店内设备的设备类型,0-未添加设备,1-专业型设备,4-通用型设备
}

type ShopIterator

type ShopIterator struct {
	// contains filtered or unexported fields
}

ShopIterator

iter, err := NewShopIterator(clt, pageIndex, pageSize)
if err != nil {
    // TODO: 增加你的代码
}

for iter.HasNext() {
    items, err := iter.NextPage()
    if err != nil {
        // TODO: 增加你的代码
    }
    // TODO: 增加你的代码
}

func NewShopIterator

func NewShopIterator(clt *mp.Client, pageIndex, pageSize int) (iter *ShopIterator, err error)

func (*ShopIterator) HasNext

func (iter *ShopIterator) HasNext() bool

func (*ShopIterator) NextPage

func (iter *ShopIterator) NextPage() (records []Shop, err error)

func (*ShopIterator) TotalCount

func (iter *ShopIterator) TotalCount() int

Jump to

Keyboard shortcuts

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