kernel

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 21 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationPaymentInterface

type ApplicationPaymentInterface interface {
	kernel.ApplicationInterface

	Scheme(productID string) string
	CodeUrlScheme(codeUrl string) string
	SetSubMerchant(mchID string, appID string) ApplicationPaymentInterface

	InSandbox() bool
	GetKey(endpoint string) (string, error)
}

type BaseClient

type BaseClient struct {
	kernel.BaseClient

	RsaOAEP *sign.RSASigner

	App *ApplicationPaymentInterface
}

func NewBaseClient

func NewBaseClient(app *ApplicationPaymentInterface) (*BaseClient, error)

func (*BaseClient) AuthSignRequest

func (client *BaseClient) AuthSignRequest(context context.Context, config *kernel.Config, endpoint string, method string, params *object.StringMap, options *object.HashMap) (*object.HashMap, error)

func (*BaseClient) AuthSignRequestSimple added in v3.0.18

func (client *BaseClient) AuthSignRequestSimple(config *kernel.Config, endpoint string, method string, params *object.StringMap, options *object.HashMap) (*object.HashMap, error)

func (*BaseClient) AuthSignRequestV2

func (client *BaseClient) AuthSignRequestV2(endpoint string, method string, params *object.HashMap, options *object.HashMap) (*object.HashMap, error)

func (*BaseClient) HttpUploadJson added in v3.0.39

func (client *BaseClient) HttpUploadJson(ctx context.Context, url string, files *object.HashMap, form *kernel.UploadForm, options *object.HashMap, queries *object.StringMap, outHeader interface{}, outBody interface{}) (interface{}, error)

func (*BaseClient) OverrideGetMiddlewareOfAccessToken

func (client *BaseClient) OverrideGetMiddlewareOfAccessToken()

func (*BaseClient) OverrideGetMiddlewares

func (client *BaseClient) OverrideGetMiddlewares()

func (*BaseClient) PlainRequest

func (client *BaseClient) PlainRequest(ctx context.Context, endpoint string, params *object.StringMap, method string, options *object.HashMap,
	returnRaw bool, outHeader interface{}, outBody interface{},
) (response *http.Response, err error)

func (*BaseClient) RegisterHttpMiddlewares

func (client *BaseClient) RegisterHttpMiddlewares()

----------------------------------------------------------------------

func (*BaseClient) Request

func (client *BaseClient) Request(ctx context.Context, endpoint string, params *object.StringMap, method string, options *object.HashMap,
	returnRaw bool, outHeader interface{}, outBody interface{},
) (response *http.Response, err error)

func (*BaseClient) RequestArray

func (client *BaseClient) RequestArray(ctx context.Context, url string, method string, options *object.HashMap, outHeader interface{}, outBody interface{}) (*object.HashMap, error)

func (*BaseClient) RequestRawXML added in v3.0.18

func (client *BaseClient) RequestRawXML(ctx context.Context, url string, params *object.StringMap, method string, options *object.HashMap, outHeader interface{}, outBody interface{}) (interface{}, error)

func (*BaseClient) RequestV2

func (client *BaseClient) RequestV2(ctx context.Context, endpoint string, params *object.HashMap, method string, option *object.HashMap,
	returnRaw bool, outHeader interface{}, outBody interface{},
) (response *http.Response, err error)

func (*BaseClient) SafeRequest

func (client *BaseClient) SafeRequest(ctx context.Context, url string, params *object.HashMap, method string, option *object.HashMap, outHeader interface{}, outBody interface{}) (interface{}, error)

func (*BaseClient) SafeRequestV3 added in v3.0.19

func (client *BaseClient) SafeRequestV3(ctx context.Context, url string, params *object.StringMap, method string, option *object.HashMap, outHeader interface{}, outBody interface{}) (interface{}, error)

func (*BaseClient) StreamDownload

func (client *BaseClient) StreamDownload(ctx context.Context, requestDownload *power.RequestDownload, filePath string) (int64, error)

func (*BaseClient) Wrap

func (client *BaseClient) Wrap(endpoint string) string

Jump to

Keyboard shortcuts

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