From dcd9f5c5eca331f51826f9b8b9611f9715dfad02 Mon Sep 17 00:00:00 2001 From: mya Date: Sat, 30 Dec 2023 13:24:16 -0600 Subject: [PATCH] docs: add basic readme content --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index e69de29..69f6f0f 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,34 @@ +# api-go + +Golang implementation of the Licensing API as defined by the [proto](https://code.pitz.tech/licensing/proto) repository. + +```go +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() +} +```