external_service

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExternalServiceDriver = ExternalServiceDriverClass{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type BaseExternalServiceClass

type BaseExternalServiceClass struct {
}

让外部服务可以通过这个基类调用内部功能

func (*BaseExternalServiceClass) GetJson

func (bes *BaseExternalServiceClass) GetJson(url string, params map[string]interface{}) (interface{}, *go_error.ErrorInfo)

func (*BaseExternalServiceClass) GetJsonForStruct

func (bes *BaseExternalServiceClass) GetJsonForStruct(url string, params map[string]interface{}, struct_ interface{}) *go_error.ErrorInfo

func (*BaseExternalServiceClass) Init

func (*BaseExternalServiceClass) PostJson

func (bes *BaseExternalServiceClass) PostJson(url string, params map[string]interface{}) (interface{}, *go_error.ErrorInfo)

func (*BaseExternalServiceClass) PostJsonForStruct

func (bes *BaseExternalServiceClass) PostJsonForStruct(url string, params map[string]interface{}, struct_ interface{}) *go_error.ErrorInfo

type ExternalServiceDriverClass

type ExternalServiceDriverClass struct {
	// contains filtered or unexported fields
}

接口驱动

func (*ExternalServiceDriverClass) Call

func (this *ExternalServiceDriverClass) Call(name string, method string) interface{}

func (*ExternalServiceDriverClass) Register

func (this *ExternalServiceDriverClass) Register(name string, svc IExternalService) bool

func (*ExternalServiceDriverClass) Startup

func (this *ExternalServiceDriverClass) Startup()

type IExternalService added in v1.0.7

type IExternalService interface {
	Init(driver *ExternalServiceDriverClass)

	PostJsonForStruct(url string, params map[string]interface{}, struct_ interface{}) *go_error.ErrorInfo
	PostJson(url string, params map[string]interface{}) (interface{}, *go_error.ErrorInfo)
	GetJsonForStruct(url string, params map[string]interface{}, struct_ interface{}) *go_error.ErrorInfo
	GetJson(url string, params map[string]interface{}) (interface{}, *go_error.ErrorInfo)
}

Jump to

Keyboard shortcuts

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