How to Configure Client
Client is the Go client used to obtain upgrade strategies and other resources. To make requests using the Go SDK, you need to initialize a Client instance and modify the default configuration items of the Client as needed.
Prerequisites
- Already registered an UpgradeLink account.
- Obtained AccessKey and AccessSecret.
Get Credentials

Default Configuration Example
go
package test
import (
"fmt"
"testing"
"github.com/toolsetlink/upgradelink-api-go/client"
)
func TestInit(t *testing.T) {
var config = client.Config{}
config.SetAccessKey("mui2W50H1j-OC4xD6PgQag")
config.SetAccessSecret("PEbdHFGC0uO_Pch7XWBQTMsFRxKPQAM2565eP8LJ3gc")
Client, err := client.NewClient(&config)
if err != nil {
return
}
}Configuration Parameter Summary
| Parameter Name | Required | Type | Example Value | Description |
|---|---|---|---|---|
| accessKey | Yes | string | 89c8b3d5f2a74e1b | AccessKey |
| secretKey | Yes | string | 89c8b3d5f2a74e1b | AccessSecret |
| protocol | No | string | HTTPS | Protocol, default is HTTP |
| endpoint | No | string | api.api.com | Service domain name, default is api.upgrade.toolsetlink.com, can be switched to your own service domain name. |