clients

package
v0.0.0-...-a71e659 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Providers to use with wire

Functions

This section is empty.

Types

type HTTP

type HTTP interface {
	GetJSON(url string, result interface{}) (*http.Response, error)
	PostJSON(url string, body, result interface{}) (*http.Response, error)
	PostJSONNoResult(url string, body interface{}) (*http.Response, error)
}

HTTP wraps http.Client in order to provide error handling

func NewHTTPClient

func NewHTTPClient() HTTP

NewHTTPClient creates a new HTTP

type InternalClient

type InternalClient interface {
	CreateInvoice(total decimal.Decimal, currency string) (*dtos.InvoiceDto, error)
}

InternalClient for the internal plugin server hosted by vendopunkto Used by plugins to "talk back" to the host.

func NewInternalClient

func NewInternalClient(hostAddress string, client HTTP) (InternalClient, error)

NewInternalClient creates an InternalClient

type NoResults

type NoResults interface {
	TheNoResultsInterfaceIsAHack()
}

NoResults to be used when you don't want http post unmarshaling

type PublicClient

type PublicClient interface {
	GetInvoice(ID string) (*dtos.InvoiceDto, error)
	GeneratePaymentMethodAdress(invoiceID string, currency string) (*dtos.InvoiceDto, error)
}

PublicClient for the internal plugin server hosted by vendopunkto Used by plugins to "talk back" to the host.

func NewPublicClient

func NewPublicClient(hostAddress string, client HTTP) (PublicClient, error)

NewPublicClient creates a new PublicClient

Jump to

Keyboard shortcuts

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