contributors/v1 | ||
legal | ||
licenses/v1 | ||
packages/v1 | ||
products/v1 | ||
tokens/v1 | ||
users/v1 | ||
.gitignore | ||
.woodpecker.yml | ||
buf.gen.yaml | ||
client.go | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md |
api-go
A Golang implementation of the Licensing API as defined by the proto repository.
package main
import (
"google.golang.org/grpc"
"code.pitz.tech/licensing/api-go"
)
func main() {
clientConn, err := grpc.Dial("host:port") // grpc.Dial("host:port", dialopts...)
if err != nil {
panic(err)
}
client, err := api.NewClient(api.ClientConfig{
ClientConn: clientConn,
})
if err != nil {
panic(err)
}
client.Contributors()
client.Licenses()
client.Packages()
client.Products()
client.Tokens()
client.Users()
}