openWork

package
v3.0.45 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 17 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 Http added in v3.0.40

type Http struct {
	Timeout float64
	BaseURI string
}

type Log

type Log struct {
	Level string
	File  string
	ENV   string
}

type OAuth

type OAuth struct {
	Callback string
	Scopes   []string
}

type OpenWork

type OpenWork struct {
	*kernel.ServiceContainer

	Base                *base.Client
	Server              *server.Guard
	Corp                *corp.Client
	Provider            *provider.Client
	SuiteAccessToken    *suit.AccessToken
	ProviderAccessToken *auth.AccessToken
	SuiteTicket         *suit.SuiteTicket
	MiniProgram         *miniProgram.Client
	Media               *media.Client
	Contact             *contact.Client
	LicenseOrder        *license.Client
	LicenseAccount      *license.Account
	Device              *device.Client

	Encryptor *kernel.Encryptor
	Config    *kernel.Config
	Logger    *logger.Logger
}

func NewOpenWork

func NewOpenWork(config *UserConfig) (*OpenWork, error)

func (*OpenWork) GetAccessToken

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

func (*OpenWork) GetComponent

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

func (*OpenWork) GetConfig

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

func (*OpenWork) GetContainer

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

func (*OpenWork) GetMiniProgram

func (app *OpenWork) GetMiniProgram() (application *workMiniProgram.Application, err error)

type UserConfig

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

	ResponseType string
	Log          Log
	OAuth        OAuth
	Cache        kernel.CacheInterface

	Http Http

	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