forked from huaweicloud/huaweicloud-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aksk_options.go
47 lines (36 loc) · 1.21 KB
/
aksk_options.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package aksk
// AKSKAuthOptions presents the required information for AK/SK auth
type AKSKOptions struct {
// IdentityEndpoint specifies the HTTP endpoint that is required to work with
// the Identity API of the appropriate version. While it's ultimately needed by
// all of the identity services, it will often be populated by a provider-level
// function.
//
// The IdentityEndpoint is typically referred to as the "auth_url" or
// "OS_AUTH_URL" in the information provided by the cloud operator.
IdentityEndpoint string `json:"-" required:"true"`
// user project id
ProjectID string
DomainID string `json:"-" required:"true"`
// region
Region string
//Cloud name
Domain string
//Cloud name
Cloud string
AccessKey string //Access Key
SecretKey string //Secret key
SecurityToken string
}
// GetIdentityEndpoint,Implements the method of AuthOptionsProvider
func (opts AKSKOptions) GetIdentityEndpoint() string {
return opts.IdentityEndpoint
}
//GetProjectId, Implements the method of AuthOptionsProvider
func (opts AKSKOptions) GetProjectId() string {
return opts.ProjectID
}
// GetDomainId,Implements the method of AuthOptionsProvider
func (opts AKSKOptions) GetDomainId() string {
return opts.DomainID
}