req

package
v0.0.0-...-4702bed Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PushURL = "https://api.tpns.tencent.com/v3/push/app"

Functions

func NewAccountPackagePush

func NewAccountPackagePush(
	message tpns.Message,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewAllPush

func NewAllPush(
	message tpns.Message,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewListAccountPush

func NewListAccountPush(
	accounts []string, message tpns.Message,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewPush

func NewPush(req *tpns.Request, opts ...ReqOpt) (*http.Request, string, error)

func NewPushReq

func NewPushReq(req *tpns.Request, opts ...ReqOpt) (request *http.Request, reqBody string, err error)

func NewSingleAccountPush

func NewSingleAccountPush(
	message tpns.Message,
	account string,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewTagsPush

func NewTagsPush(
	tagList []tpns.TagRule, message tpns.Message,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewTokenPackagePush

func NewTokenPackagePush(
	message tpns.Message,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewTokenPush

func NewTokenPush(
	tokens []string, message tpns.Message,
	opts ...ReqOpt,
) (*http.Request, string, error)

func NewUploadFileRequest

func NewUploadFileRequest(host string, file string) (*http.Request, error)

func URL

func URL(url string)

Types

type ReqOpt

type ReqOpt func(*tpns.Request)

func AccountList

func AccountList(al []string) ReqOpt

func AccountListAdd

func AccountListAdd(a string) ReqOpt

func AddAccountPushType

func AddAccountPushType(accountPushType int) ReqOpt

func AddChannelRules

func AddChannelRules(ChannelRules []*tpns.ChannelDistributeRule) ReqOpt

ChannelDistributeRules

func AddCollapseId

func AddCollapseId(collapseId int) ReqOpt

func AddEnvironment

func AddEnvironment(Environment tpns.CommonRspEnv) ReqOpt

func AddExpireTime

func AddExpireTime(expireTime int) ReqOpt

func AddForceCollapse

func AddForceCollapse(forceCollapse bool) ReqOpt

func AddLoopParam

func AddLoopParam(loopParam *tpns.PushLoopParam) ReqOpt

ChannelDistributeRules

func AddMultiPkg

func AddMultiPkg(multipPkg bool) ReqOpt

func AddPlanId

func AddPlanId(planId string) ReqOpt

func AddPushSpeed

func AddPushSpeed(pushSpeed int) ReqOpt

func AddSendTime

func AddSendTime(sendTime string) ReqOpt

func AddTPNSOnlinePushType

func AddTPNSOnlinePushType(onlinePushType int) ReqOpt

func AddUploadId

func AddUploadId(UploadId int) ReqOpt

func AndroidCustomContent

func AndroidCustomContent(ct string) ReqOpt

func Aps

func Aps(aps *tpns.Aps) ReqOpt

func AudienceType

func AudienceType(at tpns.AudienceType) ReqOpt

func Clearable

func Clearable(c *int) ReqOpt

func Content

func Content(c string) ReqOpt

func EnvDev

func EnvDev() ReqOpt

func EnvProd

func EnvProd() ReqOpt

func IconRes

func IconRes(ir string) ReqOpt

func IconType

func IconType(it *int) ReqOpt

func Lights

func Lights(l *int) ReqOpt

func Message

func Message(m tpns.Message) ReqOpt

func MessageType

func MessageType(t tpns.MessageType) ReqOpt

func Ring

func Ring(ring *int) ReqOpt

func RingRaw

func RingRaw(rr string) ReqOpt

func Title

func Title(t string) ReqOpt

func TokenList

func TokenList(tl []string) ReqOpt

func TokenListAdd

func TokenListAdd(t string) ReqOpt

func Vibrate

func Vibrate(v *int) ReqOpt

Jump to

Keyboard shortcuts

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