Documentation
¶
Index ¶
- Constants
- func GetBaseURL(cc string) string
- func GetBaseURLFromAuthFunc(f AuthFunc) string
- func GetDefaultHTTPClient() *http.Client
- func IsJSONResponseOK(responseStatus *common.Status) bool
- type Address
- type Addresses
- type AuthFunc
- type BodyMock
- type BulkInput
- type Client
- type ClientMock
- type ObjAttribute
Constants ¶
View Source
const ( //MaxIdleConns for Erply API MaxIdleConns = 25 //MaxConnsPerHost for Erply API MaxConnsPerHost = 25 )
View Source
const (
BaseUrl = "https://%s.erply.com/api/"
)
Variables ¶
This section is empty.
Functions ¶
func GetBaseURL ¶
func GetBaseURLFromAuthFunc ¶ added in v1.3.1
func GetDefaultHTTPClient ¶
func IsJSONResponseOK ¶
Types ¶
type Address ¶
type Address struct {
AddressID int `json:"addressID"`
OwnerID int `json:"ownerID"`
TypeID interface{} `json:"typeID"`
Address2 string `json:"address2"`
Address string `json:"address"`
Street string `json:"street"`
PostalCode string `json:"postalCode"`
City string `json:"city"`
State string `json:"state"`
Country string `json:"country"`
}
Address from getAddresses
type BodyMock ¶
BodyMock implements resp.Body
func NewMockFromStr ¶
NewFromStr creates BodyMock from a string
func NewMockFromStruct ¶
func NewMockFromStruct(input interface{}) *BodyMock
NewFromStruct creates BodyMock from a struct converted to json or string
type Client ¶
type Client struct {
Url string
// contains filtered or unexported fields
}
func (*Client) SendRequest ¶
type ClientMock ¶
type ClientMock struct {
ErrToGive error
ResponseToGive *http.Response
Requests []*http.Request
Lock sync.Mutex
}
ClientMock mocks HttpClient interface
type ObjAttribute ¶
Click to show internal directories.
Click to hide internal directories.