authzed

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

Client represents an open connection to Authzed.

Clients are backed by a gRPC client and as such are thread-safe.

func NewClient

func NewClient(endpoint string, opts ...grpc.DialOption) (*Client, error)

NewClient initializes a brand new client for interacting with Authzed.

Example
systemCerts, err := grpcutil.WithSystemCerts(grpcutil.VerifyCA)
if err != nil {
	log.Fatalf("failed to load system certs: %s", err)
}
client, err := authzed.NewClient(
	"grpc.authzed.com:443",
	grpcutil.WithBearerToken("tc_my_token_deadbeefdeadbeefdeadbeef"),
	systemCerts,
)
if err != nil {
	log.Fatalf("failed to connect to authzed: %s", err)
}
log.Println(client)
Output:

type ClientWithExperimental

type ClientWithExperimental struct {
	Client

	v1.ExperimentalServiceClient
}

ClientWithExperimental represents and open connection to Authzed with experimental services available.

Clients are backed by a gRPC client and as such are thread-safe.

func NewClientWithExperimentalAPIs

func NewClientWithExperimentalAPIs(endpoint string, opts ...grpc.DialOption) (*ClientWithExperimental, error)

NewClientWithExperimentalAPIs initializes a brand new client for interacting with Authzed.

Jump to

Keyboard shortcuts

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