1
Go to file
mya e8b7d106ba
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
chore: regenerate api from source
2023-12-31 13:44:12 -06:00
contributors/v1 chore: regenerate api from source 2023-12-31 13:44:12 -06:00
legal feat: introduce base client library 2023-12-30 13:17:19 -06:00
licenses/v1 chore: regenerate api from source 2023-12-31 13:44:12 -06:00
packages/v1 chore: regenerate api from source 2023-12-31 13:44:12 -06:00
products/v1 chore: regenerate api from source 2023-12-31 13:44:12 -06:00
tokens/v1 chore: regenerate api from source 2023-12-31 13:44:12 -06:00
users/v1 chore: regenerate api from source 2023-12-31 13:44:12 -06:00
.gitignore ci: add woodpecker 2023-12-30 20:51:43 -06:00
.woodpecker.yml ci: fail build when changes linger 2023-12-30 23:22:41 -06:00
buf.gen.yaml feat: introduce base client library 2023-12-30 13:17:19 -06:00
client.go feat: introduce base client library 2023-12-30 13:17:19 -06:00
go.mod feat: introduce base client library 2023-12-30 13:17:19 -06:00
go.sum feat: introduce base client library 2023-12-30 13:17:19 -06:00
LICENSE feat: introduce base client library 2023-12-30 13:17:19 -06:00
Makefile feat: introduce base client library 2023-12-30 13:17:19 -06:00
README.md ci: add woodpecker 2023-12-30 20:51:43 -06:00

api-go

status-badge

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()
}