shortlink

package
v2.1.5557 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortLink struct {
	*context.Context
}

ShortLink 短链接

func NewShortLink(ctx *context.Context) *ShortLink

NewShortLink 实例

func (*ShortLink) GenerateShortLinkPermanent

func (shortLink *ShortLink) GenerateShortLinkPermanent(PageURL, pageTitle string) (string, error)

GenerateShortLinkPermanent 生成永久shortLink

func (*ShortLink) GenerateShortLinkTemp

func (shortLink *ShortLink) GenerateShortLinkTemp(PageURL, pageTitle string) (string, error)

GenerateShortLinkTemp 生成临时shortLink

type ShortLinker

type ShortLinker struct {

	// pageUrl 通过 Short Link 进入的小程序页面路径,必须是已经发布的小程序存在的页面,可携带 query,最大1024个字符
	PageURL string `json:"page_url"`

	// pageTitle 页面标题,不能包含违法信息,超过20字符会用... 截断代替
	PageTitle string `json:"page_title"`

	// isPermanent 生成的 Short Link 类型,短期有效:false,永久有效:true
	IsPermanent bool `json:"is_permanent,omitempty"`
}

ShortLinker 请求结构体

Jump to

Keyboard shortcuts

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