Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { v1.SchemaServiceClient v1.PermissionsServiceClient v1.WatchServiceClient }
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.
Click to show internal directories.
Click to hide internal directories.