Skip to content

Commit

Permalink
feat(2022-10-11): updated the sdk as per the api spec released on 202…
Browse files Browse the repository at this point in the history
…2-10-11 (#61)

Signed-off-by: Ujjwal Kumar <[email protected]>

Signed-off-by: Ujjwal Kumar <[email protected]>
  • Loading branch information
ujjwal-ibm authored Oct 14, 2022
1 parent 08d584c commit b2f9a91
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 234 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/IBM/vpc-go-sdk)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

# IBM Cloud VPC Go SDK Version 0.26.0
# IBM Cloud VPC Go SDK Version 0.27.0
Go client library to interact with the various [IBM Cloud VPC Services APIs](https://cloud.ibm.com/apidocs?category=vpc).

**Note:** Given the current version of all VPC SDKs across supported languages and the current VPC API specification, we retracted the vpc-go-sdk version 1.x to version v0.6.0, which had the same features as v1.0.1.
Consider using v0.26.0 from now on. Refrain from using commands like `go get -u ..` and `go get ..@latest` on go 1.14 and lower as you will not get the latest release.
Consider using v0.27.0 from now on. Refrain from using commands like `go get -u ..` and `go get ..@latest` on go 1.14 and lower as you will not get the latest release.

This SDK uses [Semantic Versioning](https://semver.org), and as such there may be backward-incompatible changes for any new `0.y.z` version.
## Table of Contents
Expand Down Expand Up @@ -64,7 +64,7 @@ Use this command to download and install the VPC Go SDK service to allow your Go
use it:

```
go get github.com/IBM/vpc-go-sdk@v0.26.0
go get github.com/IBM/vpc-go-sdk@v0.27.0
```


Expand All @@ -90,7 +90,7 @@ to your `Gopkg.toml` file. Here is an example:
```
[[constraint]]
name = "github.com/IBM/vpc-go-sdk/"
version = "0.26.0"
version = "0.27.0"
```

Then run `dep ensure`.
Expand Down
14 changes: 7 additions & 7 deletions common/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const (
SDK_NAME = "vpc-go-sdk"
)

//
// GetSdkHeaders - returns the set of SDK-specific headers to be included in an outgoing request.
//
// This function is invoked by generated service methods (i.e. methods which implement the REST API operations
Expand All @@ -25,13 +24,14 @@ const (
// as in the example below.
//
// Parameters:
// serviceName - the name of the service as defined in the API definition (e.g. "MyService1")
// serviceVersion - the version of the service as defined in the API definition (e.g. "V1")
// operationId - the operationId as defined in the API definition (e.g. getContext)
//
// serviceName - the name of the service as defined in the API definition (e.g. "MyService1")
// serviceVersion - the version of the service as defined in the API definition (e.g. "V1")
// operationId - the operationId as defined in the API definition (e.g. getContext)
//
// Returns:
// a Map which contains the set of headers to be included in the REST API request
//
// a Map which contains the set of headers to be included in the REST API request
func GetSdkHeaders(serviceName string, serviceVersion string, operationId string) map[string]string {
sdkHeaders := make(map[string]string)

Expand All @@ -40,10 +40,10 @@ func GetSdkHeaders(serviceName string, serviceVersion string, operationId string
return sdkHeaders
}

var userAgent string = fmt.Sprintf("%s-%s %s", SDK_NAME, Version, GetSystemInfo())
var UserAgent string = fmt.Sprintf("%s-%s %s", SDK_NAME, Version, GetSystemInfo())

func GetUserAgentInfo() string {
return userAgent
return UserAgent
}

var systemInfo = fmt.Sprintf("(arch=%s; os=%s; go.version=%s)", runtime.GOARCH, runtime.GOOS, runtime.Version())
Expand Down
2 changes: 1 addition & 1 deletion common/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common

// Version of the SDK
const Version = "0.26.0"
const Version = "0.27.0"
Loading

0 comments on commit b2f9a91

Please sign in to comment.