openPlatform

package
v2.0.1-beta19 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 7 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 Log

type Log struct {
	Level string
	File  string
	ENV   string
}

type OAuth

type OAuth struct {
	Callback string
	Scopes   []string
}

type OpenPlatform

type OpenPlatform struct {
	*kernel.ServiceContainer

	Base         *base.Client
	VerifyTicket *auth.VerifyTicket
	AccessToken  *auth.AccessToken
	Server       *server.Guard
	Encryptor    *kernel.Encryptor

	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

type UserConfig

type UserConfig struct {
	AppID    string
	Secret   string
	AuthCode string

	ResponseType string
	Log          Log
	OAuth        OAuth
	Cache        kernel.CacheInterface

	HttpDebug bool
	Debug     bool
}

Jump to

Keyboard shortcuts

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