Documentation
¶
Index ¶
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 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 ClientMock ¶
type ClientMock struct {
ErrToGive error
ResponseToGive *http.Response
Requests []*http.Request
Lock sync.Mutex
}
ClientMock mocks HttpClient interface
type ObjAttribute ¶
type Status ¶
type Status struct {
Request string `json:"request"`
RequestUnixTime int `json:"requestUnixTime"`
ResponseStatus string `json:"responseStatus"`
ErrorCode int `json:"errorCode"`
ErrorField string `json:"errorField"`
GenerationTime float64 `json:"generationTime"`
RecordsTotal int `json:"recordsTotal"`
RecordsInResponse int `json:"recordsInResponse"`
}
Click to show internal directories.
Click to hide internal directories.