openplatform_supplement

package
v0.0.0-...-94578c2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthrInfo

func GetAuthrInfo(appid string) (*AuthorizerInfo, *AuthBaseInfo, error)

GetAuthrInfo 获取授权方的帐号基本信息

func GetBinary

func GetBinary(url string) ([]byte, error)

func GetJson

func GetJson(url string, out interface{}) error

func GetRefreshToken

func GetRefreshToken(appid string) (string, error)

func PostJson

func PostJson(url string, in interface{}, out interface{}) error

func RefreshAuthrToken

func RefreshAuthrToken(ctx *openplatform.OpenPlatform, appid, refreshToken string) (*context.AuthrAccessToken, error)

RefreshAuthrToken 获取(刷新)授权公众号或小程序的接口调用凭据(令牌)

func SetRefreshToken

func SetRefreshToken(appid string, refreshToken string) error

func SyncAuthrAccessToken

func SyncAuthrAccessToken(appid string, isForces ...bool) error

Types

type AuthBaseInfo

type AuthBaseInfo context.AuthBaseInfo

type AuthorizerInfo

type AuthorizerInfo struct {
	NickName        string     `json:"nick_name"`
	HeadImg         string     `json:"head_img"`
	ServiceTypeInfo context.ID `json:"service_type_info"`
	VerifyTypeInfo  context.ID `json:"verify_type_info"`
	UserName        string     `json:"user_name"`
	PrincipalName   string     `json:"principal_name"`
	BusinessInfo    struct {
		OpenStore string `json:"open_store"`
		OpenScan  string `json:"open_scan"`
		OpenPay   string `json:"open_pay"`
		OpenCard  string `json:"open_card"`
		OpenShake string `json:"open_shake"`
	}
	Alias     string `json:"alias"`
	QrcodeURL string `json:"qrcode_url"`

	Idc             int              `json:"idc,omitempty"`
	Signature       string           `json:"signature,omitempty"`
	MiniProgramInfo *MiniProgramInfo `json:"MiniProgramInfo,omitempty"`
}

AuthorizerInfo 授权方详细信息

type Category

type Category struct {
	First  string `json:"first"`
	Second string `json:"second"`
}

type Err

type Err struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
}

type MiniProgramInfo

type MiniProgramInfo struct {
	Network     *Network    `json:"network"`
	Categories  []*Category `json:"categories"`
	VisitStatus int         `json:"visit_status"`
}

type Network

type Network struct {
	RequestDomain   []string `json:"RequestDomain"`
	WsRequestDomain []string `json:"WsRequestDomain"`
	UploadDomain    []string `json:"UploadDomain"`
	DownloadDomain  []string `json:"DownloadDomain"`
	BizDomain       []string `json:"BizDomain"`
	UDPDomain       []string `json:"UDPDomain"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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