Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -278,6 +278,10 @@ should not be necessary. This SDK provides a wrapper around the generated client

#### Example: Creating an Edge Management API Client
```golang
func emptyTotpCallback(ch chan string) {
ch <- "" // Send an empty string
close(ch)
}

apiUrl, _ = url.Parse("https://localhost:1280/edge/management/v1")

@@ -294,7 +298,10 @@ credentials.CaPool = caPool

//Note: the CA pool can be provided here or during the Authenticate(<creds>) call. It is allowed here to enable
// calls to REST API endpoints that do not require authentication.
managementClient := edge_apis.NewManagementApiClient(apiUrl, credentials.GetCaPool()),
var apiUrls []*url.URL
apiUrls = append(apiUrls, apiUrl)

managementClient := edge_apis.NewManagementApiClient(apiUrls, credentials.GetCaPool(), emptyTotpCallback)),

//"configTypes" are string identifiers of configuration that can be requested by clients. Developers may
//specify their own in order to provide distributed identity and/or service specific configurations.
@@ -324,7 +331,7 @@ credentials.CaPool = caPool

//Note: the CA pool can be provided here or during the Authenticate(<creds>) call. It is allowed here to enable
// calls to REST API endpoints that do not require authentication.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also take the totpCallback, or nil.

client := edge_apis.NewClientApiClient(apiUrl, credentials.GetCaPool()),
client := edge_apis.NewClientApiClient(apiUrl, credentials.GetCaPool(), ),

//"configTypes" are string identifiers of configuration that can be requested by clients. Developers may
//specify their own in order to provide distributed identity and/or service specific configurations. The