device

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckTagUserExistsResult

type CheckTagUserExistsResult struct {
	common.ResponseBase

	Result bool `json:"result"`
}

判断设备与标签的绑定请求结果

func (*CheckTagUserExistsResult) FromResponse

func (result *CheckTagUserExistsResult) FromResponse(resp *http.Response) error

func (*CheckTagUserExistsResult) String

func (result *CheckTagUserExistsResult) String() string

type DeviceUpdate

type DeviceUpdate struct {
	// 支持 add, remove 或者空字符串。
	// 当 tags 参数为空字符串的时候,表示清空所有的 tags;
	// add/remove 下是增加或删除指定的 tags
	Tags tags

	// 更新设备的别名属性;当别名为空串时,删除指定设备的别名;
	Alias string

	// 手机号码
	Mobile string
}

func NewDeviceUpdate

func NewDeviceUpdate() *DeviceUpdate

func (*DeviceUpdate) AddTags

func (du *DeviceUpdate) AddTags(tags ...string)

func (*DeviceUpdate) ClearAllTags

func (du *DeviceUpdate) ClearAllTags()

func (*DeviceUpdate) MarshalJSON

func (du *DeviceUpdate) MarshalJSON() ([]byte, error)

func (*DeviceUpdate) RemoveTags

func (du *DeviceUpdate) RemoveTags(tags ...string)

func (*DeviceUpdate) SetAlias

func (du *DeviceUpdate) SetAlias(alias string)

func (*DeviceUpdate) SetMobile

func (du *DeviceUpdate) SetMobile(mobile string)

type GetAliasUsersResult

type GetAliasUsersResult struct {
	common.ResponseBase

	RegistrationIds []string `json:"registration_ids"`
}

func (*GetAliasUsersResult) FromResponse

func (result *GetAliasUsersResult) FromResponse(resp *http.Response) error

func (*GetAliasUsersResult) String

func (result *GetAliasUsersResult) String() string

type GetTagsResult

type GetTagsResult struct {
	common.ResponseBase

	Tags []string `json:"tags"`
}

查询标签列表请求结果

func (*GetTagsResult) FromResponse

func (tir *GetTagsResult) FromResponse(resp *http.Response) error

func (*GetTagsResult) String

func (tir *GetTagsResult) String() string

type QueryDeviceResult

type QueryDeviceResult struct {
	common.ResponseBase

	// 设备的所有属性,包含tags, alias
	Tags  []string `json:"tags"`
	Alias string   `json:"alias"`
}

func (*QueryDeviceResult) FromResponse

func (dir *QueryDeviceResult) FromResponse(resp *http.Response) error

func (*QueryDeviceResult) String

func (dir *QueryDeviceResult) String() string

type UpdateTagUsersArgs

type UpdateTagUsersArgs struct {
	RegistrationIds map[string][]string `json:"registration_ids"`
}

更新标签(与设备的绑定的关系)请求参数

func NewUpdateTagUsersArgs

func NewUpdateTagUsersArgs() *UpdateTagUsersArgs

func (*UpdateTagUsersArgs) AddRegistrationIds

func (args *UpdateTagUsersArgs) AddRegistrationIds(ids ...string)

func (*UpdateTagUsersArgs) RemoveRegistrationIds

func (args *UpdateTagUsersArgs) RemoveRegistrationIds(ids ...string)

Jump to

Keyboard shortcuts

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