urllink

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TExpireType

type TExpireType int

TExpireType 失效类型 (指定时间戳/指定间隔)

const (
	// ExpireTypeTime 指定时间戳后失效
	ExpireTypeTime TExpireType = 0

	// ExpireTypeInterval 间隔指定天数后失效
	ExpireTypeInterval TExpireType = 1
)

type ULParams

type ULParams struct {
	Path           string      `json:"path"`
	Query          string      `json:"query"`
	IsExpire       bool        `json:"is_expire"`
	ExpireType     TExpireType `json:"expire_type"`
	ExpireTime     int64       `json:"expire_time"`
	ExpireInterval int         `json:"expire_interval"`
}

ULParams 请求参数 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html#请求参数

type ULResult

type ULResult struct {
	util.CommonError

	URLLink string `json:"url_link"`
}

ULResult 返回的结果 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html#返回值

type URLLink struct {
	*context2.Context
}

URLLink 小程序 URL Link

func NewURLLink(ctx *context2.Context) *URLLink

NewURLLink 实例化

func (*URLLink) Generate

func (u *URLLink) Generate(ctx context.Context, params *ULParams) (string, error)

Generate 生成url link

Jump to

Keyboard shortcuts

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