openWork

package
v3.2.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 15 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
	ProxyURI 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 OpenWork

type OpenWork struct {
	*kernel.ServiceContainer

	Base             *base.Client
	Server           *server.Guard
	User             *user.Client
	ExternalContact  *externalcontact.Client
	Suite            *suit.Client
	SuiteAccessToken *suit.AccessToken
	SuiteTicket      *suit.SuiteTicket

	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) ProviderClient added in v3.2.7

func (app *OpenWork) ProviderClient(corpID string, permanentCode string, externConfig *work.UserConfig) (*work.Work, error)

ProviderWork 服务商代开发用

func (*OpenWork) ThirdpartyClient added in v3.2.7

func (app *OpenWork) ThirdpartyClient(corpID string, permanentCode string, externConfig *work.UserConfig) (*work.Work, error)

ThirdpartyWork 第三方应用

type OpenWorkProvider added in v3.2.7

type OpenWorkProvider struct {
	*kernel.ServiceContainer

	Base        *base.Client
	Config      *kernel.Config
	Logger      *logger.Logger
	AccessToken *provider.AccessToken

	Client  *provider.Client
	License *license.Client
}

func NewOpenWorkProvider added in v3.2.7

func NewOpenWorkProvider(config *UserConfig) (*OpenWorkProvider, error)

func (*OpenWorkProvider) GetAccessToken added in v3.2.7

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

func (*OpenWorkProvider) GetComponent added in v3.2.7

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

func (*OpenWorkProvider) GetConfig added in v3.2.7

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

func (*OpenWorkProvider) GetContainer added in v3.2.7

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

type UserConfig

type UserConfig struct {
	AppID          string
	Secret         string
	ProviderCorpID string
	ProviderSecret string
	AuthCode       string
	Token          string
	AESKey         string
	CallbackURL    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