miniProgram

package
v0.0.0-...-f556482 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapUserConfig

func MapUserConfig(userConfig *UserConfig) (*object.HashMap, error)

Types

type Encryptor

type Encryptor struct {
	BaseEncryptor *kernel.Encryptor
	// contains filtered or unexported fields
}

func NewEncryptor

func NewEncryptor(appID, token, aesKey string) (*Encryptor, error)

func (Encryptor) DecryptData

func (encryptor Encryptor) DecryptData(encrypted string, sessionKey string, iv string) ([]byte, *support.CryptError)

type Log

type Log struct {
	Level string
	File  string
	ENV   string
}

type MiniProgram

type MiniProgram struct {
	*kernel.ServiceContainer

	Base        *base.Client
	AccessToken *auth.AccessToken
	Auth        *auth.Client

	Encryptor              *Encryptor
	CustomerServiceMessage *customerServiceMessage.Client

	Config *kernel.Config
	Logger *logger.Logger
}

func NewMiniProgram

func NewMiniProgram(config *UserConfig, extraInfos ...*kernel.ExtraInfo) (*MiniProgram, error)

func (*MiniProgram) GetAccessToken

func (app *MiniProgram) GetAccessToken() *kernel.AccessToken

func (*MiniProgram) GetComponent

func (app *MiniProgram) GetComponent(name string) interface{}

func (*MiniProgram) GetConfig

func (app *MiniProgram) GetConfig() *kernel.Config

func (*MiniProgram) GetContainer

func (app *MiniProgram) GetContainer() *kernel.ServiceContainer

type OAuth

type OAuth struct {
	Callback string
	Scopes   []string
}

type UserConfig

type UserConfig struct {
	AppID  string
	Secret string

	RefreshToken      string
	ComponentAppID    string
	ComponentAppToken string
	Token             string
	AESKey            string

	ResponseType string
	Log          Log
	OAuth        OAuth
	Cache        kernel.CacheInterface

	HttpDebug bool
	Debug     bool
	NotifyURL string
	Sandbox   bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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