Documentation
¶
Index ¶
- Constants
- func GetAuthenticatorFromEnvironment(credentialKey string) (core.Authenticator, error)
- func GetSdkAnalyticsHeader(serviceName string, serviceVersion string, operationID string) string
- func GetSdkHeaders(serviceName string, serviceVersion string, operationID string) map[string]string
- func GetSystemInfo() string
- func GetUserAgentInfo() string
- type BaseService
Constants ¶
const Version = "0.0.41"
Version of the SDK
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticatorFromEnvironment ¶ added in v0.0.39
func GetAuthenticatorFromEnvironment(credentialKey string) (core.Authenticator, error)
GetAuthenticatorFromEnvironment instantiates an Authenticator using service properties retrieved from external config sources.
func GetSdkAnalyticsHeader ¶ added in v0.0.25
func GetSdkHeaders ¶
GetSdkHeaders - returns the set of SDK-specific headers to be included in an outgoing request.
This function is invoked by generated service methods (i.e. methods which implement the REST API operations defined within the API definition). The purpose of this function is to give the SDK implementor the opportunity to provide SDK-specific HTTP headers that will be sent with an outgoing REST API request. This function is invoked for each invocation of a generated service method, so the set of HTTP headers could be request-specific.
Parameters:
serviceName - the name of the service as defined in the API definition (e.g. "MyService1") serviceVersion - the version of the service as defined in the API definition (e.g. "V1") operationId - the operationId as defined in the API definition (e.g. getContext)
Returns:
a Map which contains the set of headers to be included in the REST API request
func GetSystemInfo ¶
func GetSystemInfo() string
func GetUserAgentInfo ¶
func GetUserAgentInfo() string
Types ¶
type BaseService ¶ added in v0.0.36
type BaseService struct {
*core.BaseService
// contains filtered or unexported fields
}
func NewBaseService ¶ added in v0.0.36
func NewBaseService(opts *core.ServiceOptions) (*BaseService, error)
func (*BaseService) Clone ¶ added in v0.0.36
func (c *BaseService) Clone() *BaseService
func (*BaseService) Request ¶ added in v0.0.36
func (c *BaseService) Request(req *http.Request, result interface{}) (detailedResponse *core.DetailedResponse, err error)
func (*BaseService) SetServiceURL ¶ added in v0.0.36
func (c *BaseService) SetServiceURL(url string) error