addresses

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(client *common.Client) *Client

func (*Client) GetAddresses

func (cli *Client) GetAddresses(ctx context.Context, filters map[string]string) ([]sharedCommon.Address, error)

func (*Client) GetAddressesBulk added in v1.4.0

func (cli *Client) GetAddressesBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetAddressesResponseBulk, error)

GetAddressesBulk will list addresses according to specified filters sending a bulk request to fetch more addresses than the default limit

func (*Client) SaveAddress

func (cli *Client) SaveAddress(ctx context.Context, filters map[string]string) ([]sharedCommon.Address, error)

func (*Client) SaveAddressesBulk added in v1.4.0

func (cli *Client) SaveAddressesBulk(ctx context.Context, addrMap []map[string]interface{}, attrs map[string]string) (SaveAddressesResponseBulk, error)

type GetAddressesResponseBulk added in v1.4.0

type GetAddressesResponseBulk struct {
	Status    sharedCommon.Status            `json:"status"`
	BulkItems []GetAddressesResponseBulkItem `json:"requests"`
}

type GetAddressesResponseBulkItem added in v1.4.0

type GetAddressesResponseBulkItem struct {
	Status    sharedCommon.StatusBulk `json:"status"`
	Addresses sharedCommon.Addresses  `json:"records"`
}

type Manager

type Manager interface {
	GetAddresses(ctx context.Context, filters map[string]string) ([]sharedCommon.Address, error)
	GetAddressesBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetAddressesResponseBulk, error)
	SaveAddress(ctx context.Context, filters map[string]string) ([]sharedCommon.Address, error)
	SaveAddressesBulk(ctx context.Context, addrMap []map[string]interface{}, attrs map[string]string) (SaveAddressesResponseBulk, error)
}

type Response

type Response struct {
	Status    sharedCommon.Status    `json:"status"`
	Addresses sharedCommon.Addresses `json:"records"`
}

GetAddressesResponse ..

type SaveAddressResp added in v1.4.0

type SaveAddressResp struct {
	AddressID int `json:"addressID"`
}

type SaveAddressesResponseBulk added in v1.4.0

type SaveAddressesResponseBulk struct {
	Status    sharedCommon.Status             `json:"status"`
	BulkItems []SaveAddressesResponseBulkItem `json:"requests"`
}

type SaveAddressesResponseBulkItem added in v1.4.0

type SaveAddressesResponseBulkItem struct {
	Status  sharedCommon.StatusBulk `json:"status"`
	Records []SaveAddressResp       `json:"records"`
}

Jump to

Keyboard shortcuts

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