d1-client-go

module
v0.1.32-ci.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2022 License: Apache-2.0

README

Go Client Packages for CYBERCRYPT D1

Go client packages for

D1 Storage Client

In order to use the D1 Storage client you will need credentials for a user. If you are using the built in Standalone ID Provider you can refer to the Getting Started guide for details on how to obtain these. If you are using an OIDC provider you will need to obtain and ID Token in the usual way.

When using the Standalone ID Provider the easiest way to use the D1 Storage client is through the NewStorageClientWR constructor. The resulting client will automatically refresh the user's access token when it expires. For specific code examples, see the godocs.

When using an OIDC provider you must use the NewStorageClient constructor and provide the ID Token as gRPC metadata via the context:

ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "bearer " + idToken)
client, _ := NewStorageClient(...)
client.Store(ctx, ...)

D1 Generic Client

In order to use the D1 Generic client you will need credentials for a user. If you are using the built in Standalone ID Provider you can refer to the Getting Started guide for details on how to obtain these. If you are using an OIDC provider you will need to obtain and ID Token in the usual way.

When using the Standalone ID Provider the easiest way to use the D1 Generic client is through the NewGenericClientWR constructor. The resulting client will automatically refresh the user's access token when it expires. For specific code examples, see the godocs.

When using an OIDC provider you must use the NewGenericClient constructor and provide the ID Token as gRPC metadata via the context:

ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "bearer " + idToken)
client, _ := NewGenericClient(...)
client.Encrypt(ctx, ...)

License

The software in the CYBERCRYPT d1-client-go repository is licensed under the Apache License 2.0.

Directories

Path Synopsis
Package client contains clients for the CYBERCRYPT D1 Generic service.
Package client contains clients for the CYBERCRYPT D1 Generic service.
Package client contains clients for the CYBERCRYPT D1 Storage service.
Package client contains clients for the CYBERCRYPT D1 Storage service.
d1-client-go/k1 is a client library for CYBERCRYPT K1.
d1-client-go/k1 is a client library for CYBERCRYPT K1.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL