uslk

package
v0.21.42 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package uslk include resources of ucloud uslk product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchCreateUSLKShortLinkRequest

type BatchCreateUSLKShortLinkRequest struct {
	request.CommonBase

	// 过期时间戳(秒级),传 3376656000 表示生成永久生效短链接
	EndTime *int `required:"true"`

	// 长链接数组,示例: "LongLinks.0": "http://ucloud.cn/0", "LongLinks.1": "http://ucloud.cn/1"
	LongLinks []string `required:"true"`

	// 协议名称:http/https
	Proto *string `required:"true"`

	// 场景ID
	ScenarioID *int `required:"true"`

	// 短链接域名
	ShortLinkDomain *string `required:"true"`

	// 开始生效时间戳(秒级), 传 3376656000 表示生成永久生效短链接
	StartTime *int `required:"true"`
}

BatchCreateUSLKShortLinkRequest is request schema for BatchCreateUSLKShortLink action

type BatchCreateUSLKShortLinkResponse

type BatchCreateUSLKShortLinkResponse struct {
	response.CommonBase

	// Message
	Message string

	// 创建成功的短链接,根据传LongLinks顺序排列
	ShortLinks []string
}

BatchCreateUSLKShortLinkResponse is response schema for BatchCreateUSLKShortLink action

type CreateUSLKLongLinkRequest

type CreateUSLKLongLinkRequest struct {
	request.CommonBase

	// 要报备的长链接
	LongLink *string `required:"true"`

	// 场景ID
	ScenarioID *int `required:"true"`
}

CreateUSLKLongLinkRequest is request schema for CreateUSLKLongLink action

type CreateUSLKLongLinkResponse

type CreateUSLKLongLinkResponse struct {
	response.CommonBase

	// 长链接ID
	LongLinkID int

	// Message
	Message string

	// ReqUuid
	ReqUuid string
}

CreateUSLKLongLinkResponse is response schema for CreateUSLKLongLink action

type CreateUSLKScenarioRequest

type CreateUSLKScenarioRequest struct {
	request.CommonBase

	// 场景名称
	Scenario *string `required:"true"`

	// 场景说明
	ScenarioDesc *string `required:"true"`
}

CreateUSLKScenarioRequest is request schema for CreateUSLKScenario action

type CreateUSLKScenarioResponse

type CreateUSLKScenarioResponse struct {
	response.CommonBase

	// Message
	Message string

	// ReqUuid
	ReqUuid string

	// 场景ID
	ScenarioID int
}

CreateUSLKScenarioResponse is response schema for CreateUSLKScenario action

type CreateUSLKShortLinkRequest

type CreateUSLKShortLinkRequest struct {
	request.CommonBase

	// 过期时间戳,传 3376656000 表示生成永久生效短链接
	EndTime *int `required:"true"`

	// 长链接ID,状态必须为审核通过
	LongLinkID *int `required:"true"`

	// 协议名称:http/https
	Proto *string `required:"true"`

	// 短链接域名,默认:uslk.net
	ShortLinkDomain *string `required:"false"`

	// 开始生效时间戳, 传 3376656000 表示生成永久生效短链接
	StartTime *int `required:"true"`

	// 链接类型-预留:普通跳转、随机跳转,当前默认普通跳转 1: 普通跳转
	Type *int `required:"true"`
}

CreateUSLKShortLinkRequest is request schema for CreateUSLKShortLink action

type CreateUSLKShortLinkResponse

type CreateUSLKShortLinkResponse struct {
	response.CommonBase

	// Message
	Message string

	// 生成的短链接内容
	ShortLink string
}

CreateUSLKShortLinkResponse is response schema for CreateUSLKShortLink action

type DescribeUSLKRedirectRecordsRequest

type DescribeUSLKRedirectRecordsRequest struct {
	request.CommonBase

	// 查询周期结束时间戳(ms级别)
	EndTime *int `required:"true"`

	// 模糊查询字段值,支持根据生成短链接进行模糊查询。支持字段(ShortLink,场景名称)
	FuzzySearch *string `required:"false"`

	// 每页个数,用于分页查找,默认20
	NumPerPage *int `required:"false"`

	// 根据指定字段排序:默认按短链接访问时间:CreateTime 排序
	OrderBy *string `required:"false"`

	// 排序方式。asc-正序 desc-倒序
	OrderType *string `required:"false"`

	// 页码,从0开始,用于分页查找
	Page *int `required:"false"`

	// 短链接
	ShortLink *string `required:"true"`

	// 查询周期开始时间戳(ms级别)
	StartTime *int `required:"true"`
}

DescribeUSLKRedirectRecordsRequest is request schema for DescribeUSLKRedirectRecords action

type DescribeUSLKRedirectRecordsResponse

type DescribeUSLKRedirectRecordsResponse struct {
	response.CommonBase

	// 长链接列表
	Data []RedirectRecords

	// Message
	Message string

	// 数据总量
	Total int
}

DescribeUSLKRedirectRecordsResponse is response schema for DescribeUSLKRedirectRecords action

type DescribeUSLKShortLinkListRequest

type DescribeUSLKShortLinkListRequest struct {
	request.CommonBase

	// 查询周期结束时间戳
	EndTime *int `required:"false"`

	// 模糊查询字段值,支持根据生成短链接进行模糊查询。支持字段(LonkLink,场景名称)
	FuzzySearch *string `required:"false"`

	// 长链接ID
	LongLinkID *int `required:"false"`

	// 每页个数,用于分页查找,默认20
	NumPerPage *int `required:"false"`

	// 根据指定字段排序:默认按创建时间:CreateTime 排序,支持值:CreateTime,StartTime,EndTime
	OrderBy *string `required:"false"`

	// 排序方式。asc-正序 desc-倒序
	OrderType *string `required:"false"`

	// 页码,从0开始,用于分页查找
	Page *int `required:"false"`

	// 场景ID
	ScenarioID *int `required:"false"`

	// 短链
	ShortLink *string `required:"false"`

	// 查询周期开始时间戳
	StartTime *int `required:"false"`

	// 1: 待生效;2:已生效;3:已失效;4:已删除(预留);5:已封禁
	Status *int `required:"false"`
}

DescribeUSLKShortLinkListRequest is request schema for DescribeUSLKShortLinkList action

type DescribeUSLKShortLinkListResponse

type DescribeUSLKShortLinkListResponse struct {
	response.CommonBase

	// 短链接列表
	Data []ShortLink

	// Message
	Message string
}

DescribeUSLKShortLinkListResponse is response schema for DescribeUSLKShortLinkList action

type RedirectRecords

type RedirectRecords struct {

	// 账户ID
	AccountID int

	// 访问设备
	Browser string

	// 访问IP
	ClientIP string

	// 访问操作系统
	Os string

	// 访问省份信息
	ProvinceCode string

	// 重定向时间戳 (ms)
	RedirectTime int

	// 访问时间戳(ms)
	RequestTime int

	// 报备场景
	Scenario string

	// 场景ID
	ScenarioID int

	// 短链接
	ShortLink string

	// 短链接域名
	ShortLinkDomain string
}

RedirectRecords - 访问明细

type SecondaryLinkForQuery

type SecondaryLinkForQuery struct {

	// 是否是次链接
	IsSecondary bool

	// 长链接
	LongLink string

	// 长链接ID
	LongLinkID int

	// 操作系统,例如: Windows,Android,多个以逗号分隔
	Oses string

	// 省份codes,例如: Hebei,Shandong,多个以逗号分隔
	ProvinceCodes string

	// 场景名称
	Scenario string

	// 场景ID
	ScenarioID int

	// 长短链接映射ID
	ShortLongMapID int
}

SecondaryLinkForQuery - SecondaryLink查询实体

type ShortLink struct {

	// 累计访问量
	ClickCount int

	// 当日访问量
	ClickCountToday int

	// 短链接创建时间
	CreateTime int

	// 删除时间戳
	DeleteTime int

	// 短链接过期时间戳
	EndTime int

	// 短链接ID
	ID int

	// 关联长链接列表
	LongLinks []string

	// 操作人
	Operator string

	// 操作说明(封禁原因)
	Remark string

	// 报备场景
	Scenario string

	// 场景描述
	ScenarioDesc string

	// 场景ID
	ScenarioID int

	// 次链接,智能跳转类型才有
	SecondaryLinks []SecondaryLinkForQuery

	// 短链接
	ShortLink string

	// 短链接域名
	ShortLinkDomain string

	// 短链接开始生效时间戳
	StartTime int

	// 短链接状态:1: 待生效;2:已生效;3:已失效;4:已删除(预留);5:已封禁
	Status int

	// 链接类型-预留:1:普通跳转 3:智能跳转等
	Type int

	// 累计独立访问量
	UniqueClickCount int

	// 今日独立访问量
	UniqueClickCountToday int

	// 更新时间戳
	UpdateTime int
}

ShortLink - 短链接返回模型

type USLKClient

type USLKClient struct {
	*ucloud.Client
}

USLKClient is the client of USLK

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *USLKClient

NewClient will return a instance of USLKClient

API: BatchCreateUSLKShortLink

批量创建短链接【免审】

func (c *USLKClient) CreateUSLKLongLink(req *CreateUSLKLongLinkRequest) (*CreateUSLKLongLinkResponse, error)

API: CreateUSLKLongLink

报备长链接

func (*USLKClient) CreateUSLKScenario

func (c *USLKClient) CreateUSLKScenario(req *CreateUSLKScenarioRequest) (*CreateUSLKScenarioResponse, error)

API: CreateUSLKScenario

长链接报备场景创建

API: CreateUSLKShortLink

创建短链接

func (*USLKClient) DescribeUSLKRedirectRecords

API: DescribeUSLKRedirectRecords

查询短链接访问明细列表

API: DescribeUSLKShortLinkList

查询短链接列表

func (*USLKClient) NewBatchCreateUSLKShortLinkRequest

func (c *USLKClient) NewBatchCreateUSLKShortLinkRequest() *BatchCreateUSLKShortLinkRequest

NewBatchCreateUSLKShortLinkRequest will create request of BatchCreateUSLKShortLink action.

func (*USLKClient) NewCreateUSLKLongLinkRequest

func (c *USLKClient) NewCreateUSLKLongLinkRequest() *CreateUSLKLongLinkRequest

NewCreateUSLKLongLinkRequest will create request of CreateUSLKLongLink action.

func (*USLKClient) NewCreateUSLKScenarioRequest

func (c *USLKClient) NewCreateUSLKScenarioRequest() *CreateUSLKScenarioRequest

NewCreateUSLKScenarioRequest will create request of CreateUSLKScenario action.

func (*USLKClient) NewCreateUSLKShortLinkRequest

func (c *USLKClient) NewCreateUSLKShortLinkRequest() *CreateUSLKShortLinkRequest

NewCreateUSLKShortLinkRequest will create request of CreateUSLKShortLink action.

func (*USLKClient) NewDescribeUSLKRedirectRecordsRequest

func (c *USLKClient) NewDescribeUSLKRedirectRecordsRequest() *DescribeUSLKRedirectRecordsRequest

NewDescribeUSLKRedirectRecordsRequest will create request of DescribeUSLKRedirectRecords action.

func (*USLKClient) NewDescribeUSLKShortLinkListRequest

func (c *USLKClient) NewDescribeUSLKShortLinkListRequest() *DescribeUSLKShortLinkListRequest

NewDescribeUSLKShortLinkListRequest will create request of DescribeUSLKShortLinkList action.

Jump to

Keyboard shortcuts

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