feat: config goedge api user role

This commit is contained in:
Fu Diwei
2025-05-15 21:05:22 +08:00
parent a3a56f3346
commit 1ee3b64a19
10 changed files with 87 additions and 18 deletions

View File

@@ -14,7 +14,7 @@ import (
type Client struct {
apiHost string
apiUserType string
apiRole string
accessKeyId string
accessKey string
@@ -25,12 +25,12 @@ type Client struct {
client *resty.Client
}
func NewClient(apiHost, apiUserType, accessKeyId, accessKey string) *Client {
func NewClient(apiHost, apiRole, accessKeyId, accessKey string) *Client {
client := resty.New()
return &Client{
apiHost: strings.TrimRight(apiHost, "/"),
apiUserType: apiUserType,
apiRole: apiRole,
accessKeyId: accessKeyId,
accessKey: accessKey,
client: client,