|
|
@@ -28,7 +28,7 @@ type Client struct { |
|
|
|
config *Config |
|
|
|
} |
|
|
|
|
|
|
|
func (client *Client) InitWithOptions(host string, config *Config, creditial auth.Credential) (err error) { |
|
|
|
func (client *Client) InitWithOptions(host string, config *Config, credential auth.Credential) (err error) { |
|
|
|
client.httpClient = &http.Client{} |
|
|
|
|
|
|
|
if config.Transport != nil { |
|
|
@@ -41,7 +41,6 @@ func (client *Client) InitWithOptions(host string, config *Config, creditial aut |
|
|
|
client.httpClient.Timeout = config.Timeout |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
client.signer, err = auth.NewSignerWithCredential(credential, client.ProcessCommonRequestWithSigner) |
|
|
|
|
|
|
|
return nil |
|
|
@@ -55,7 +54,6 @@ func (client *Client) InitWithConfig() (config *Config) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (client *Client) ProcessCommonRequestWithSigner(request *requests.CommonRequest, signerInterface interface{}) (response *responses.CommonResponse, err error) { |
|
|
|
if signer, isSigner := signerInterface.(auth.Signer); isSigner { |
|
|
|
response = responses.NewCommonResponse() |
|
|
@@ -114,5 +112,5 @@ func (client *Client) DoAction(request requests.AcsRequest, response responses.A |
|
|
|
} |
|
|
|
|
|
|
|
func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, signer auth.Signer) (err error) { |
|
|
|
return nil |
|
|
|
|
|
|
|
} |