openWork

package
v3.0.0-beta6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 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 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

	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