https://github.com/accelbyte/ic-go-sdk
https://github.com/accelbyte/ic-go-sdk
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/accelbyte/ic-go-sdk
- Owner: AccelByte
- License: apache-2.0
- Created: 2023-12-11T14:53:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-30T04:39:30.000Z (about 2 years ago)
- Last Synced: 2024-06-19T05:34:12.915Z (almost 2 years ago)
- Language: Go
- Size: 25.4 KB
- Stars: 0
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ic-go-sdk
This is AccelByte's IC Go SDK for integrating with IC in Go projects.
## Usage
### Importing package
```go
import "github.com/AccelByte/ic-go-sdk"
```
### Creating default IC client
```go
cfg := &iam.Config{
BaseURL: "",
ClientID: "",
ClientSecret: "",
}
client := iam.NewDefaultClient(cfg)
cfg := &ic.Config{
BaseURL: "",
ClientID: "",
ClientSecret: "",
}
client := ic.NewDefaultClient(cfg)
```
### Validate config
```go
_, err := client.ClientToken()
if err != nil {
logrus.Fatalf("ic-go-sdk start err: %v \n", err)
}
```
### Example:
1. replace the placeholder in ```example/example.go```
2. ```go build example.go```