-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement paging of results (breaking change) (#392)
* Update paging `limit` parameters for APIs * Add `EntityArray` pagination helpers * bump go to 1.23.3 for new features * add further `EntityArray` pagination helpers * add acc testing client * Add pagination codegen * generate SDK with pagination * add acceptance test * docs draft * correct package ref for acctest * docs gen post processing * correct docs * versions and changelogs
- Loading branch information
1 parent
64440a3
commit 657b47d
Showing
260 changed files
with
7,465 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package acctest | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"os" | ||
|
||
"github.com/patrickcping/pingone-go-sdk-v2/management" | ||
"github.com/patrickcping/pingone-go-sdk-v2/pingone" | ||
) | ||
|
||
func TestClient(ctx context.Context) (*pingone.Client, error) { | ||
|
||
clientID := os.Getenv("PINGONE_CLIENT_ID_TESTACC") | ||
clientSecret := os.Getenv("PINGONE_CLIENT_SECRET_TESTACC") | ||
environmentID := os.Getenv("PINGONE_ENVIRONMENT_ID_TESTACC") | ||
regionCode := management.EnumRegionCode(os.Getenv("PINGONE_REGION_CODE_TESTACC")) | ||
|
||
if err := os.Setenv("PINGONE_API_ACCESS_TOKEN", ""); err != nil { | ||
return nil, err | ||
} | ||
|
||
if err := os.Setenv("PINGONE_API_SERVICE_HOSTNAME", ""); err != nil { | ||
return nil, err | ||
} | ||
|
||
if err := os.Setenv("PINGONE_AUTH_SERVICE_HOSTNAME", ""); err != nil { | ||
return nil, err | ||
} | ||
|
||
config := &pingone.Config{ | ||
ClientID: &clientID, | ||
ClientSecret: &clientSecret, | ||
EnvironmentID: &environmentID, | ||
RegionCode: ®ionCode, | ||
} | ||
|
||
client, err := config.APIClient(ctx) | ||
|
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if client.AuthorizeAPIClient == nil { | ||
return nil, fmt.Errorf("Authorize Client not successfully retrieved, authorize is null") | ||
} | ||
|
||
if client.CredentialsAPIClient == nil { | ||
return nil, fmt.Errorf("Credentials Client not successfully retrieved, credentials is null") | ||
} | ||
|
||
if client.ManagementAPIClient == nil { | ||
return nil, fmt.Errorf("Management Client not successfully retrieved, management is null") | ||
} | ||
|
||
if client.MFAAPIClient == nil { | ||
return nil, fmt.Errorf("Management Client not successfully retrieved, mfa is null") | ||
} | ||
|
||
if client.RiskAPIClient == nil { | ||
return nil, fmt.Errorf("Management Client not successfully retrieved, risk is null") | ||
} | ||
|
||
if client.VerifyAPIClient == nil { | ||
return nil, fmt.Errorf("Management Client not successfully retrieved, verify is null") | ||
} | ||
|
||
return client, nil | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.6.1 | ||
0.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.