qrcode

package
v0.0.0-...-f5adc6c Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2014 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

定义二维码相关数据结构

Index

Constants

View Source
const (
	TemporaryQRCodeExpireSecondsLimit = 1800   // 临时二维码 expire seconds 限制
	PermanentQRCodeSceneIdLimit       = 100000 // 永久二维码 scene id 限制
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PermanentQRCode

type PermanentQRCode struct {
	SceneId uint32 `json:"scene_id"` // 场景值 id, 目前参数只支持1--100000
	Ticket  string `json:"ticket"`   // 二维码ticket, 凭借此ticket可以在有效时间内换取二维码.
}

永久二维码

func (*PermanentQRCode) URL

func (qrcode *PermanentQRCode) URL() string

二维码的 URL, 可以 GET 此 URL 下载二维码

type TemporaryQRCode

type TemporaryQRCode struct {
	SceneId   uint32 `json:"scene_id"`       // 场景值 id, 32位非0整型
	Ticket    string `json:"ticket"`         // 二维码ticket, 凭借此ticket可以在有效时间内换取二维码.
	ExpiresIn int    `json:"expire_seconds"` // 有效期, 单位为"秒"
}

临时二维码

func (*TemporaryQRCode) URL

func (qrcode *TemporaryQRCode) URL() string

二维码的 URL, 可以 GET 此 URL 下载二维码

Jump to

Keyboard shortcuts

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