kernel

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 18 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

	App *ApplicationPaymentInterface
}

func NewBaseClient

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

func (*BaseClient) AuthSignRequest

func (client *BaseClient) AuthSignRequest(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) AuthSignRequestV2_

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

func (*BaseClient) OverrideGetMiddlewareOfAccessToken

func (client *BaseClient) OverrideGetMiddlewareOfAccessToken()

func (*BaseClient) OverrideGetMiddlewares

func (client *BaseClient) OverrideGetMiddlewares()

func (*BaseClient) PlainRequest

func (client *BaseClient) PlainRequest(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 interface{}, 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) RequestRaw

func (client *BaseClient) RequestRaw(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) StreamDownload

func (client *BaseClient) StreamDownload(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