Common
Go SDK is divided into 3 clients:
Floating client
License client
Management client
Response Types
There are 3 response wrapper types. These are used for future extendability and ease of use.
Client.Response
Management_response.SearchResult
Error
Client.Response
Response type is used by all 3 clients, and it's a generic wrapper for any request:
type Response[T any] struct {
Payload []byte // raw response JSON
Value T // typed value
Error error // error, if it exists
}As an example, license_client.ActivateLicense would return client.Response[LicenseResponse], so response.Value would be of type LicenseResponse. Example:
Management_response.SearchResult
SearchResult is used only in management client to wrap search/list request responses. For example, for ListCustomers requests.
Error
Error type is commonly used as response for Delete requests, e.g. DeleteCustomer.
Was this helpful?