https://github.com/zeropsio/zerops-go
https://github.com/zeropsio/zerops-go
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zeropsio/zerops-go
- Owner: zeropsio
- License: mit
- Created: 2022-05-04T12:52:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-28T12:51:20.000Z (about 1 year ago)
- Last Synced: 2025-07-18T11:58:51.387Z (11 months ago)
- Language: Go
- Size: 238 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Installation
`go get -u github.com/zeropsio/zerops-go`
# Basic example
```go
package main
import (
"context"
"fmt"
"net/http"
"os"
"github.com/zeropsio/zerops-go/sdk"
"github.com/zeropsio/zerops-go/sdkBase"
)
func main() {
ctx := context.Background()
zdk := sdk.New(
sdkBase.DefaultConfig(),
http.DefaultClient,
)
authorizedSdk := sdk.AuthorizeSdk(zdk, os.Getenv("token"))
info, err := authorizedSdk.GetUserInfo(ctx)
if err != nil {
panic(err)
}
i, err := info.Output()
if err != nil {
panic(err)
}
clientId := i.ClientUserList[0].ClientId
fmt.Println(clientId)
}
```