Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Providers = wire.NewSet(NewHTTPClient)
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
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
Click to show internal directories.
Click to hide internal directories.