officialAccount

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 37 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapUserConfig

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

Types

type Http added in v3.0.40

type Http struct {
	Timeout float64
	BaseURI string
}

type Log

type Log struct {
	Driver contract.LoggerInterface
	Level  string
	File   string
	Error  string
	ENV    string
	Stdout bool
}

type OAuth

type OAuth struct {
	Callback string
	Scopes   []string
}

type OfficialAccount

type OfficialAccount struct {
	*kernel.ServiceContainer

	Base        *base.Client
	AccessToken *auth.AccessToken

	Config *kernel.Config

	// basic services
	Media            *media.Client
	URL              *url.Client
	QRCode           *qrCode.Client
	JSSDK            *jssdk.Client
	SubscribeMessage *subscribeMessage.Client

	Server                 *server.Guard
	Encryptor              *kernel.Encryptor
	User                   *user.Client
	UserTag                *tag.Client
	Menu                   *menu.Client
	TemplateMessage        *templateMessage.Client
	Material               *material.Client
	CustomerService        *customerService.Client
	CustomerServiceSession *session.Client
	Semantic               *semantic.Client
	DataCube               *dataCube.Client
	AutoReply              *autoReply.Client
	Broadcasting           *broadcasting.Client
	Card                   *card.Client
	Device                 *device.Client
	ShakeAround            *shakeAround.ShakeAround
	POI                    *poi.Client
	Publish                *publish.Client
	Store                  *store.Client
	Comment                *comment.Client
	OCR                    *ocr.Client
	Goods                  *goods.Client
	OAuth                  *providers2.WeChat
	Wifi                   *wifi.Client
	WifiCard               *wifi.CardClient
	WifiDevice             *wifi.DeviceClient
	WifiShop               *wifi.ShopClient
	Guide                  *guide.Client

	Logger *logger.Logger
}

func NewOfficialAccount

func NewOfficialAccount(config *UserConfig, extraInfos ...*kernel.ExtraInfo) (*OfficialAccount, error)

func (*OfficialAccount) GetAccessToken

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

func (*OfficialAccount) GetComponent

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

func (*OfficialAccount) GetConfig

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

func (*OfficialAccount) GetContainer

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

type UserConfig

type UserConfig struct {
	AppID        string
	Secret       string
	Token        string
	AESKey       string
	RefreshToken string

	ComponentAppID    string
	ComponentAppToken string

	ResponseType string
	Log          Log
	OAuth        OAuth
	Cache        kernel.CacheInterface

	Http Http

	HttpDebug bool
	Debug     bool
	NotifyURL string
	Sandbox   bool
}

Jump to

Keyboard shortcuts

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