miniprogram

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultAuthrAccessToken added in v0.2.1

func NewDefaultAuthrAccessToken(opCtx *openContext.Context, appID string) credential.AccessTokenHandle

NewDefaultAuthrAccessToken 设置access_token

Types

type DefaultAuthrAccessToken added in v0.2.1

type DefaultAuthrAccessToken struct {
	// contains filtered or unexported fields
}

DefaultAuthrAccessToken 默认获取授权ak的方法

func (*DefaultAuthrAccessToken) GetAccessToken added in v0.2.1

func (ak *DefaultAuthrAccessToken) GetAccessToken(ctx context.Context) (string, error)

GetAccessToken 获取ak

type MiniProgram

type MiniProgram struct {
	AppID string

	*miniprogram.MiniProgram
	// contains filtered or unexported fields
}

MiniProgram 代小程序实现业务

func NewMiniProgram

func NewMiniProgram(opCtx *openContext.Context, appID string) *MiniProgram

NewMiniProgram 实例化

func (*MiniProgram) GetAccessToken added in v0.2.0

func (miniProgram *MiniProgram) GetAccessToken(ctx context.Context) (string, error)

GetAccessToken 获取ak

func (*MiniProgram) GetAuth

func (miniProgram *MiniProgram) GetAuth() *auth.Auth

GetBasic 基础信息设置

func (*MiniProgram) GetBasic

func (miniProgram *MiniProgram) GetBasic() *basic.Basic

GetBasic 基础信息设置

func (*MiniProgram) GetComponent

func (miniProgram *MiniProgram) GetComponent() *component.Component

GetComponent get component 快速注册小程序相关

func (miniProgram *MiniProgram) GetURLLink() *urllink.URLLink

GetURLLink 小程序URL Link接口 调用前需确认已调用 SetAuthorizerRefreshToken 避免由于缓存中 authorizer_access_token 过期执行中断

func (*MiniProgram) SetAuthorizerRefreshToken added in v0.2.0

func (miniProgram *MiniProgram) SetAuthorizerRefreshToken(authorizerRefreshToken string) *MiniProgram

SetAuthorizerRefreshToken 设置代执操作业务授权账号authorizer_refresh_token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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