client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Option
	MinFraudAccountID  string
	MinFraudLicenseKey string
}

Client is http client for minFraud API.

func New

func New() *Client

func (*Client) CallPOST

func (c *Client) CallPOST(path string, params, result interface{}) (err error)

CallPOST sends POST request to `url` with `params` and set reqponse to `result`

func (*Client) SetAuthData

func (c *Client) SetAuthData(accountID, licenseKey string)

func (*Client) SetOption

func (c *Client) SetOption(opt Option)

type Option

type Option struct {
	BaseURL   string
	UserAgent string
	Timeout   time.Duration
	Debug     bool
	Retry     bool
	LogFn     func(msg string, opts ...interface{})
}

Option contains optional setting of Client.

func (Option) LogInfo

func (o Option) LogInfo(msg string, opts ...interface{})

Jump to

Keyboard shortcuts

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