core

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Otel

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

func NewOtel

func NewOtel(namespace string, appID string) *Otel

func (*Otel) WithSpan

func (o *Otel) WithSpan(ctx context.Context, req *http.Request, resp interface{}, payload []byte, fn func(*http.Request, interface{}) (*http.Response, error)) error

type SDKClient

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

SDKClient object

func NewSDKClient

func NewSDKClient(appID string, secret string) *SDKClient

NewSDKClient init sdk client

func (*SDKClient) ActionCb

func (c *SDKClient) ActionCb(ctx context.Context, req model.ActionCbRequest) error

func (*SDKClient) AppID

func (c *SDKClient) AppID() string

func (*SDKClient) Conversion

func (c *SDKClient) Conversion(ctx context.Context, req model.ConversionRequest, resp interface{}) (*model.ResponseHeader, error)

func (*SDKClient) Do

func (c *SDKClient) Do(ctx context.Context, req *model.Request, resp interface{}) (*model.ResponseHeader, error)

Do execute api request

func (*SDKClient) Get

func (c *SDKClient) Get(ctx context.Context, reqUrl string, resp interface{}) error

Get data through api

func (*SDKClient) OAuth

func (c *SDKClient) OAuth(ctx context.Context, req model.RequestBody, resp interface{}) error

OAuth execute oauth api request

func (*SDKClient) Post

func (c *SDKClient) Post(ctx context.Context, reqUrl string, bs []byte, resp interface{}) error

Post data through api

func (*SDKClient) Secret

func (c *SDKClient) Secret() string

func (*SDKClient) SetDebug

func (c *SDKClient) SetDebug(debug bool)

SetDebug set debug mode

func (*SDKClient) SetHttpClient

func (c *SDKClient) SetHttpClient(httpClient *http.Client)

func (*SDKClient) WithSpan

func (c *SDKClient) WithSpan(ctx context.Context, req *http.Request, resp interface{}, payload []byte, fn func(*http.Request, interface{}) (*http.Response, error)) error

func (*SDKClient) WithTracer

func (c *SDKClient) WithTracer(namespace string)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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