Documentation ¶
Index ¶
- func MapUserConfig(userConfig *UserConfig) (*object.HashMap, error)
- type Log
- type OAuth
- type OpenPlatform
- func (app *OpenPlatform) GetAccessToken() *kernel.AccessToken
- func (app *OpenPlatform) GetComponent(name string) interface{}
- func (app *OpenPlatform) GetConfig() *kernel.Config
- func (app *OpenPlatform) GetContainer() *kernel.ServiceContainer
- func (app *OpenPlatform) GetFastRegistrationURL(ctx context.Context, callbackUrl string, optional *object.StringMap) (url string, err error)
- func (app *OpenPlatform) GetMiniProgramAuthorizerConfig(appID string, refreshToken string) (userConfig *miniProgram2.UserConfig)
- func (app *OpenPlatform) GetMobilePreAuthorizationURL(ctx context.Context, callbackUrl string, optional *object.StringMap) (url string, err error)
- func (app *OpenPlatform) GetOfficialAuthorizerConfig(appID string, refreshToken string) (userConfig *officialAccount2.UserConfig, err error)
- func (app *OpenPlatform) MiniProgram(appID string, refreshToken string, accessToken *auth2.AccessToken) (application *miniProgram3.Application, err error)
- func (app *OpenPlatform) OfficialAccount(appID string, refreshToken string, accessToken *auth2.AccessToken) (application *officialAccount.Application, err error)
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapUserConfig ¶
func MapUserConfig(userConfig *UserConfig) (*object.HashMap, error)
Types ¶
type OpenPlatform ¶
type OpenPlatform struct { *kernel.ServiceContainer Base *base.Client VerifyTicket *auth.VerifyTicket AccessToken *auth.AccessToken Server *server.Guard Encryptor *kernel.Encryptor CodeTemplate *codeTemplate.Client Component *component.Client Config *kernel.Config Logger *logger.Logger }
func NewOpenPlatform ¶
func NewOpenPlatform(config *UserConfig) (*OpenPlatform, error)
func (*OpenPlatform) GetAccessToken ¶
func (app *OpenPlatform) GetAccessToken() *kernel.AccessToken
func (*OpenPlatform) GetComponent ¶
func (app *OpenPlatform) GetComponent(name string) interface{}
func (*OpenPlatform) GetConfig ¶
func (app *OpenPlatform) GetConfig() *kernel.Config
func (*OpenPlatform) GetContainer ¶
func (app *OpenPlatform) GetContainer() *kernel.ServiceContainer
func (*OpenPlatform) GetFastRegistrationURL ¶
func (app *OpenPlatform) GetFastRegistrationURL(ctx context.Context, callbackUrl string, optional *object.StringMap) (url string, err error)
Return the pre-authorization login page url. https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/Before_Develop/Authorization_Process_Technical_Description.html
func (*OpenPlatform) GetMiniProgramAuthorizerConfig ¶
func (app *OpenPlatform) GetMiniProgramAuthorizerConfig(appID string, refreshToken string) (userConfig *miniProgram2.UserConfig)
func (*OpenPlatform) GetMobilePreAuthorizationURL ¶
func (app *OpenPlatform) GetMobilePreAuthorizationURL(ctx context.Context, callbackUrl string, optional *object.StringMap) (url string, err error)
Return the pre-authorization login page url (mobile).
func (*OpenPlatform) GetOfficialAuthorizerConfig ¶
func (app *OpenPlatform) GetOfficialAuthorizerConfig(appID string, refreshToken string) (userConfig *officialAccount2.UserConfig, err error)
func (*OpenPlatform) MiniProgram ¶
func (app *OpenPlatform) MiniProgram(appID string, refreshToken string, accessToken *auth2.AccessToken) (application *miniProgram3.Application, err error)
func (*OpenPlatform) OfficialAccount ¶
func (app *OpenPlatform) OfficialAccount(appID string, refreshToken string, accessToken *auth2.AccessToken) (application *officialAccount.Application, err error)
Click to show internal directories.
Click to hide internal directories.