mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump github.com/IBM/keyprotect-go-client from 0.9.1 to 0.9.2
Bumps [github.com/IBM/keyprotect-go-client](https://github.com/IBM/keyprotect-go-client) from 0.9.1 to 0.9.2. - [Release notes](https://github.com/IBM/keyprotect-go-client/releases) - [Changelog](https://github.com/IBM/keyprotect-go-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/IBM/keyprotect-go-client/compare/v0.9.1...v0.9.2) --- updated-dependencies: - dependency-name: github.com/IBM/keyprotect-go-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
911bc6eabc
commit
bbcb0eb83e
33
vendor/github.com/IBM/keyprotect-go-client/README.md
generated
vendored
33
vendor/github.com/IBM/keyprotect-go-client/README.md
generated
vendored
@ -1,4 +1,4 @@
|
||||
# IBM Cloud Go SDK Version 0.9.1
|
||||
# IBM Cloud Go SDK Version 0.9.2
|
||||
|
||||
# keyprotect-go-client
|
||||
|
||||
@ -341,3 +341,34 @@ if err != nil {
|
||||
}
|
||||
fmt.Println(keys)
|
||||
```
|
||||
|
||||
### Support for Adding Custom Header
|
||||
|
||||
|
||||
1) From ServiceClient (For Every API Call)
|
||||
```go
|
||||
cc := kp.ClientConfig{
|
||||
BaseURL: "BASE_URL",
|
||||
APIKey: "API_KEY",
|
||||
InstanceID: "INSTANCE_ID",
|
||||
Headers: http.Header{
|
||||
"Custom-Header": {"Custom-Value"},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
2) From ServiceCall (Per API Call)
|
||||
|
||||
* Define Header just before the API Call and Empty out when done.
|
||||
|
||||
```go
|
||||
client.Config.Headers = make(http.Header))
|
||||
client.Config.Headers.Set("Custom-Header", "Custom-Header-Value")
|
||||
|
||||
key, err := client.CreateKey(params)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
client.Config.Headers = http.Header{}
|
||||
```
|
Reference in New Issue
Block a user