Skip to content

Commit 0984670

Browse files
authored
Merge 9f1a27d into 2c597ac
2 parents 2c597ac + 9f1a27d commit 0984670

File tree

1,188 files changed

+370606
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,188 files changed

+370606
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v25.0.0
2+
3+
## Features
4+
- Support for Keyfactor Command REST API endpoints up to 25.1.1. [API Change Log](https://software.keyfactor.com/Core-OnPrem/Current/Content/WebAPI/ChangeLogs/25_1_1-APIChangeLog.htm)
5+
- Add [helper methods](https://github.com/Keyfactor/keyfactor-go-client-sdk/blob/feat/AB%2372090/sdk-version-25/v25/helpers.go) to support some common lookup patterns.
6+
17
# v24.0.0
28

39
## Features

v25/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Go API client for Keyfactor Command
2+
3+
This reference serves to document REST-based methods to manage and integrate with Keyfactor. In addition, an embedded
4+
interface allows for the execution of calls against the current Keyfactor API instance.
5+
6+
This API client was generated against Command version 25.1.1.
7+
8+
Please reference the [Keyfactor Command API Change Log](https://software.keyfactor.com/Core-OnPrem/Current/Content/WebAPI/ChangeLogs/APIChangeLog.htm) for information about API endpoint support for your specific version of Keyfactor Command.
9+
10+
## Support for Keyfactor Command Go Client SDK
11+
12+
Keyfactor Command Go Client SDK is open source and supported on best effort level for this tool/library/client.
13+
This means customers can report Bugs, Feature Requests, Documentation amendment or questions as well as requests for
14+
customer information required for setup that needs Keyfactor access to obtain. Such requests do not follow normal SLA
15+
commitments for response or resolution. If you have a support issue, please open a support ticket via the Keyfactor
16+
Support Portal at https://support.keyfactor.com/
17+
18+
###### To report a problem or suggest a new feature, use the **[Issues](../../issues)** tab. If you want to contribute actual bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.
19+
20+
---
21+
22+
## Overview
23+
24+
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using
25+
the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
26+
27+
28+
## Installation
29+
30+
Install the following dependencies:
31+
32+
```shell
33+
go get "github.com/Keyfactor/keyfactor-go-client-sdk/v25"
34+
```
35+
36+
Put the package under your project folder and add the following in import:
37+
38+
```golang
39+
package main
40+
41+
import "github.com/Keyfactor/keyfactor-go-client-sdk/api/keyfactor/v25"
42+
```
43+
44+
## Configuration
45+
46+
Configuration of the API client is done through the [github.com/Keyfactor/keyfactor-auth-client-go/auth_providers](https://github.com/Keyfactor/keyfactor-auth-client-go) Go package.
47+
48+
Here is an example of configuring your API client:
49+
50+
```go
51+
import (
52+
"context"
53+
"os"
54+
"github.com/Keyfactor/keyfactor-auth-client-go/auth_providers"
55+
"github.com/Keyfactor/keyfactor-go-client-sdk/v25"
56+
)
57+
58+
hostname := os.Getenv(auth_providers.EnvKeyfactorHostName)
59+
apiPath := os.Getenv(auth_providers.EnvKeyfactorAPIPath)
60+
61+
clientId := os.Getenv(auth_providers.EnvKeyfactorClientID)
62+
clientSecret := os.Getenv(auth_providers.EnvKeyfactorClientSecret)
63+
tokenUrl := os.Getenv(auth_providers.EnvKeyfactorAuthTokenURL)
64+
65+
oAuthNoParamsConfig := auth_providers.CommandConfigOauth{}
66+
oAuthNoParamsConfig.CommandAuthConfig.
67+
WithCommandHostName(hostname).
68+
WithCommandAPIPath(apiPath).
69+
WithSkipVerify(false).
70+
WithClientTimeout(10)
71+
oAuthNoParamsConfig.
72+
WithClientId(clientId).
73+
WithClientSecret(clientSecret).
74+
WithTokenUrl(tokenUrl).
75+
Authenticate()
76+
77+
// Configure API client
78+
client, err := keyfactor.NewAPIClient(oAuthNoParamsConfig.GetServerConfig())
79+
ctx := context.Background()
80+
81+
// api := client.V1.ExampleApi // Access V1 API Service
82+
// req := api.NewUpdateExampleRequest(ctx) // Build new API request
83+
// req.ExampleUpdateRequest(V1.ExampleUpdateRequest{ Name: "Hello" }) // Add a body to the API request (if applicable)
84+
// resp, httpResp, err := req.Execute() // Execute request
85+
86+
// api := client.V2.ExampleApi // Access V2 API Service
87+
// req := api.NewUpdateExampleRequest(ctx) // Build new API request
88+
// req.ExampleUpdateRequest(V2.ExampleUpdateRequest{ Name: "Hello" }) // Add a body to the API request (if applicable)
89+
// resp, httpResp, err := req.Execute() // Execute request
90+
91+
92+
```
93+
94+
## Documentation for API Endpoints
95+
96+
All documentation for the APIs can be found in its respective API directory:
97+
98+
- [v1 API Documentation](./api/keyfactor/v1/README.md)
99+
- [v2 API Documentation](./api/keyfactor/v2/README.md)
100+

0 commit comments

Comments
 (0)