authzed

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 48

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
package main

import (
	"log"

	"github.com/authzed/grpcutil"

	authzed "github.com/authzed/authzed-go/v1"
)

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

Jump to

Keyboard shortcuts

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