Skip to content
Snippets Groups Projects
Commit 9e5597e0 authored by Michael Zigldrum's avatar Michael Zigldrum
Browse files

Add tcr usage section for Golang

parent 04167915
No related branches found
No related tags found
No related merge requests found
Pipeline #46339 passed
# How to use the Golang TCR Client library
In contrast to the js, java and python libraries this one does not require a step to generate the library code.
you can directly use it as you would any other git based Go library. An example:
```
package main
import (
"context"
"fmt"
"os"
openapiclient "gitlab.eclipse.org/eclipse/xfsc/train/trusted-content-resolver/clients/go/tcr"
)
func main() {
resolveRequest := *openapiclient.NewResolveRequest("Issuer_example", []string{"TrustSchemePointers_example"}) // ResolveRequest | Verification params
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedContentResolverAPI.ResolveTrustList(context.Background()).ResolveRequest(resolveRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedContentResolverAPI.ResolveTrustList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ResolveTrustList`: ResolveResponse
fmt.Fprintf(os.Stdout, "Response from `TrustedContentResolverAPI.ResolveTrustList`: %v\n", resp)
}
```
To see the full usage guide go here -> [TrustedContentResolverAPI](./TrustedContentResolverAPI.md)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment