refactor: refactor sdk3rd client implementations to use a unified signer structure

This commit is contained in:
Fu Diwei
2026-06-22 16:32:18 +08:00
committed by RHQYZ
parent 6826210c0d
commit dcd0ac6916
54 changed files with 1040 additions and 742 deletions
+2 -2
View File
@@ -24,14 +24,14 @@ func NewClient(optFns ...OptionsFunc) (*Client, error) {
return nil, fmt.Errorf("sdkerr: unset accessToken")
}
restyClient := resty.New().
httper := resty.New().
SetBaseURL("https://api.linode.com/v4").
SetHeader("Accept", "application/json").
SetHeader("Authorization", "Bearer "+opts.AccessToken).
SetHeader("Content-Type", "application/json").
SetHeader("User-Agent", app.AppUserAgent)
return &Client{rc: restyClient}, nil
return &Client{rc: httper}, nil
}
func (c *Client) SetTimeout(timeout time.Duration) *Client {