IOTQrcode

package
v5.1.37 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeQrcode

func MakeQrcode(args *ArgsMakeQrcode) (data string, err error)

MakeQrcode 生成指定设备的二维码参数

func MakeWeixinWXX

func MakeWeixinWXX(args *ArgsMakeWeixinWXX) (data string, err error)

MakeWeixinWXX 微信小程序二维码

Types

type ArgsMakeQrcode

type ArgsMakeQrcode struct {
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID" check:"id"`
	//二维码类型
	// normal 普通设备group+code二维码; normal_id 普通设备ID二维码; normal_key 带key的二维码; normal_connect 用于快速连接的二维码(带所有必要信息)
	QrcodeType string `db:"qrcode_type" json:"qrcodeType" check:"mark"`
	//尺寸
	// 10-5000px之间
	Size int `db:"size" json:"size" check:"intThan0"`
}

ArgsMakeQrcode 生成指定设备的二维码参数

type ArgsMakeWeixinWXX

type ArgsMakeWeixinWXX struct {
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID" check:"id"`
	//二维码类型
	// weixin_wxx 微信小程序设备group+code二维码; weixin_wxx_id 微信小程序设备ID二维码
	QrcodeType string `db:"qrcode_type" json:"qrcodeType" check:"mark"`
	//尺寸
	// eg: 430
	Size int `db:"size" json:"size" check:"intThan0"`
	//商户ID
	// 可以留空,则走平台微信小程序主体
	MerchantID int64 `json:"merchantID" check:"id" empty:"true"`
	//页面地址
	// eg: pages/index
	Page string `json:"page"`
	//是否需要透明底色
	IsHyaline bool `json:"isHyaline"`
	//自动配置线条颜色
	// 为 false 时生效, 使用 rgb 设置颜色 十进制表示
	AutoColor bool `json:"autoColor"`
	//色调
	// 50
	R string `json:"r"`
	G string `json:"g"`
	B string `json:"b"`
}

ArgsMakeWeixinWXX 微信小程序二维码参数

type FieldsQrcode

type FieldsQrcode struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID"`
	//二维码类型
	// normal 普通设备group+code二维码; normal_key 带key的二维码; normal_connect 用于快速连接的二维码(带所有必要信息); normal_id 普通设备ID二维码
	// weixin_wxx 微信小程序设备group+code二维码; weixin_wxx_id 微信小程序设备ID二维码
	QrcodeType string `db:"qrcode_type" json:"qrcodeType"`
	//二维码内容
	// 图形base数据集
	Data string `db:"data" json:"data"`
}

FieldsQrcode 二维码存储 该表设计暂时不用,未来系统承载量巨大时,再考虑启动

Jump to

Keyboard shortcuts

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