Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.16 KB

README.md

File metadata and controls

33 lines (23 loc) · 1.16 KB

PingDirectory Go Client

This repository contains a Go client for interacting with the PingDirectory configuration API. It is generated by the OpenAPI Generator project.

For a client tied to a specific version, add a version qualifier matching the PingDirectory version to your require in go.mod.

For example, for a client for PingDirectory 9.1.0.0:

require github.com/pingidentity/pingdirectory-go-client/v9100 v9100.6.0

The .6.0 refers to the version of this client module.

For detailed documentation, see the README and docs/ folder in the configurationapi/ folder.

Example - Creating a Location config object

...

import client "github.com/pingidentity/pingdirectory-go-client/v9100/configurationapi"

...

addRequest := client.NewAddLocationRequest("MyLocation")
basicAuthContext := context.WithValue(ctx, client.ContextBasicAuth, client.BasicAuth{
	UserName: username,
	Password: password,
}
apiAddRequest := r.apiClient.LocationApi.AddLocation(basicAuthContext)
apiAddRequest = apiAddRequest.AddLocationRequest(*addRequest)
addResponse, httpResp, err := r.apiClient.LocationApi.AddLocationExecute(apiAddRequest)