openfgav1connect

package
v1.10.0-20240318145223... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OpenFGAServiceReadProcedure is the fully-qualified name of the OpenFGAService's Read RPC.
	OpenFGAServiceReadProcedure = "/openfga.v1.OpenFGAService/Read"
	// OpenFGAServiceWriteProcedure is the fully-qualified name of the OpenFGAService's Write RPC.
	OpenFGAServiceWriteProcedure = "/openfga.v1.OpenFGAService/Write"
	// OpenFGAServiceCheckProcedure is the fully-qualified name of the OpenFGAService's Check RPC.
	OpenFGAServiceCheckProcedure = "/openfga.v1.OpenFGAService/Check"
	// OpenFGAServiceExpandProcedure is the fully-qualified name of the OpenFGAService's Expand RPC.
	OpenFGAServiceExpandProcedure = "/openfga.v1.OpenFGAService/Expand"
	// OpenFGAServiceReadAuthorizationModelsProcedure is the fully-qualified name of the
	// OpenFGAService's ReadAuthorizationModels RPC.
	OpenFGAServiceReadAuthorizationModelsProcedure = "/openfga.v1.OpenFGAService/ReadAuthorizationModels"
	// OpenFGAServiceReadAuthorizationModelProcedure is the fully-qualified name of the OpenFGAService's
	// ReadAuthorizationModel RPC.
	OpenFGAServiceReadAuthorizationModelProcedure = "/openfga.v1.OpenFGAService/ReadAuthorizationModel"
	// OpenFGAServiceWriteAuthorizationModelProcedure is the fully-qualified name of the
	// OpenFGAService's WriteAuthorizationModel RPC.
	OpenFGAServiceWriteAuthorizationModelProcedure = "/openfga.v1.OpenFGAService/WriteAuthorizationModel"
	// OpenFGAServiceWriteAssertionsProcedure is the fully-qualified name of the OpenFGAService's
	// WriteAssertions RPC.
	OpenFGAServiceWriteAssertionsProcedure = "/openfga.v1.OpenFGAService/WriteAssertions"
	// OpenFGAServiceReadAssertionsProcedure is the fully-qualified name of the OpenFGAService's
	// ReadAssertions RPC.
	OpenFGAServiceReadAssertionsProcedure = "/openfga.v1.OpenFGAService/ReadAssertions"
	// OpenFGAServiceReadChangesProcedure is the fully-qualified name of the OpenFGAService's
	// ReadChanges RPC.
	OpenFGAServiceReadChangesProcedure = "/openfga.v1.OpenFGAService/ReadChanges"
	// OpenFGAServiceCreateStoreProcedure is the fully-qualified name of the OpenFGAService's
	// CreateStore RPC.
	OpenFGAServiceCreateStoreProcedure = "/openfga.v1.OpenFGAService/CreateStore"
	// OpenFGAServiceUpdateStoreProcedure is the fully-qualified name of the OpenFGAService's
	// UpdateStore RPC.
	OpenFGAServiceUpdateStoreProcedure = "/openfga.v1.OpenFGAService/UpdateStore"
	// OpenFGAServiceDeleteStoreProcedure is the fully-qualified name of the OpenFGAService's
	// DeleteStore RPC.
	OpenFGAServiceDeleteStoreProcedure = "/openfga.v1.OpenFGAService/DeleteStore"
	// OpenFGAServiceGetStoreProcedure is the fully-qualified name of the OpenFGAService's GetStore RPC.
	OpenFGAServiceGetStoreProcedure = "/openfga.v1.OpenFGAService/GetStore"
	// OpenFGAServiceListStoresProcedure is the fully-qualified name of the OpenFGAService's ListStores
	// RPC.
	OpenFGAServiceListStoresProcedure = "/openfga.v1.OpenFGAService/ListStores"
	// OpenFGAServiceStreamedListObjectsProcedure is the fully-qualified name of the OpenFGAService's
	// StreamedListObjects RPC.
	OpenFGAServiceStreamedListObjectsProcedure = "/openfga.v1.OpenFGAService/StreamedListObjects"
	// OpenFGAServiceListObjectsProcedure is the fully-qualified name of the OpenFGAService's
	// ListObjects RPC.
	OpenFGAServiceListObjectsProcedure = "/openfga.v1.OpenFGAService/ListObjects"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// OpenFGAServiceName is the fully-qualified name of the OpenFGAService service.
	OpenFGAServiceName = "openfga.v1.OpenFGAService"
)

Variables

This section is empty.

Functions

func NewOpenFGAServiceHandler

func NewOpenFGAServiceHandler(svc OpenFGAServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewOpenFGAServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type OpenFGAServiceClient

type OpenFGAServiceClient interface {
	Read(context.Context, *connect_go.Request[v1.ReadRequest]) (*connect_go.Response[v1.ReadResponse], error)
	Write(context.Context, *connect_go.Request[v1.WriteRequest]) (*connect_go.Response[v1.WriteResponse], error)
	Check(context.Context, *connect_go.Request[v1.CheckRequest]) (*connect_go.Response[v1.CheckResponse], error)
	Expand(context.Context, *connect_go.Request[v1.ExpandRequest]) (*connect_go.Response[v1.ExpandResponse], error)
	ReadAuthorizationModels(context.Context, *connect_go.Request[v1.ReadAuthorizationModelsRequest]) (*connect_go.Response[v1.ReadAuthorizationModelsResponse], error)
	ReadAuthorizationModel(context.Context, *connect_go.Request[v1.ReadAuthorizationModelRequest]) (*connect_go.Response[v1.ReadAuthorizationModelResponse], error)
	WriteAuthorizationModel(context.Context, *connect_go.Request[v1.WriteAuthorizationModelRequest]) (*connect_go.Response[v1.WriteAuthorizationModelResponse], error)
	WriteAssertions(context.Context, *connect_go.Request[v1.WriteAssertionsRequest]) (*connect_go.Response[v1.WriteAssertionsResponse], error)
	ReadAssertions(context.Context, *connect_go.Request[v1.ReadAssertionsRequest]) (*connect_go.Response[v1.ReadAssertionsResponse], error)
	ReadChanges(context.Context, *connect_go.Request[v1.ReadChangesRequest]) (*connect_go.Response[v1.ReadChangesResponse], error)
	CreateStore(context.Context, *connect_go.Request[v1.CreateStoreRequest]) (*connect_go.Response[v1.CreateStoreResponse], error)
	UpdateStore(context.Context, *connect_go.Request[v1.UpdateStoreRequest]) (*connect_go.Response[v1.UpdateStoreResponse], error)
	DeleteStore(context.Context, *connect_go.Request[v1.DeleteStoreRequest]) (*connect_go.Response[v1.DeleteStoreResponse], error)
	GetStore(context.Context, *connect_go.Request[v1.GetStoreRequest]) (*connect_go.Response[v1.GetStoreResponse], error)
	ListStores(context.Context, *connect_go.Request[v1.ListStoresRequest]) (*connect_go.Response[v1.ListStoresResponse], error)
	StreamedListObjects(context.Context, *connect_go.Request[v1.StreamedListObjectsRequest]) (*connect_go.ServerStreamForClient[v1.StreamedListObjectsResponse], error)
	ListObjects(context.Context, *connect_go.Request[v1.ListObjectsRequest]) (*connect_go.Response[v1.ListObjectsResponse], error)
}

OpenFGAServiceClient is a client for the openfga.v1.OpenFGAService service.

func NewOpenFGAServiceClient

func NewOpenFGAServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) OpenFGAServiceClient

NewOpenFGAServiceClient constructs a client for the openfga.v1.OpenFGAService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type OpenFGAServiceHandler

type OpenFGAServiceHandler interface {
	Read(context.Context, *connect_go.Request[v1.ReadRequest]) (*connect_go.Response[v1.ReadResponse], error)
	Write(context.Context, *connect_go.Request[v1.WriteRequest]) (*connect_go.Response[v1.WriteResponse], error)
	Check(context.Context, *connect_go.Request[v1.CheckRequest]) (*connect_go.Response[v1.CheckResponse], error)
	Expand(context.Context, *connect_go.Request[v1.ExpandRequest]) (*connect_go.Response[v1.ExpandResponse], error)
	ReadAuthorizationModels(context.Context, *connect_go.Request[v1.ReadAuthorizationModelsRequest]) (*connect_go.Response[v1.ReadAuthorizationModelsResponse], error)
	ReadAuthorizationModel(context.Context, *connect_go.Request[v1.ReadAuthorizationModelRequest]) (*connect_go.Response[v1.ReadAuthorizationModelResponse], error)
	WriteAuthorizationModel(context.Context, *connect_go.Request[v1.WriteAuthorizationModelRequest]) (*connect_go.Response[v1.WriteAuthorizationModelResponse], error)
	WriteAssertions(context.Context, *connect_go.Request[v1.WriteAssertionsRequest]) (*connect_go.Response[v1.WriteAssertionsResponse], error)
	ReadAssertions(context.Context, *connect_go.Request[v1.ReadAssertionsRequest]) (*connect_go.Response[v1.ReadAssertionsResponse], error)
	ReadChanges(context.Context, *connect_go.Request[v1.ReadChangesRequest]) (*connect_go.Response[v1.ReadChangesResponse], error)
	CreateStore(context.Context, *connect_go.Request[v1.CreateStoreRequest]) (*connect_go.Response[v1.CreateStoreResponse], error)
	UpdateStore(context.Context, *connect_go.Request[v1.UpdateStoreRequest]) (*connect_go.Response[v1.UpdateStoreResponse], error)
	DeleteStore(context.Context, *connect_go.Request[v1.DeleteStoreRequest]) (*connect_go.Response[v1.DeleteStoreResponse], error)
	GetStore(context.Context, *connect_go.Request[v1.GetStoreRequest]) (*connect_go.Response[v1.GetStoreResponse], error)
	ListStores(context.Context, *connect_go.Request[v1.ListStoresRequest]) (*connect_go.Response[v1.ListStoresResponse], error)
	StreamedListObjects(context.Context, *connect_go.Request[v1.StreamedListObjectsRequest], *connect_go.ServerStream[v1.StreamedListObjectsResponse]) error
	ListObjects(context.Context, *connect_go.Request[v1.ListObjectsRequest]) (*connect_go.Response[v1.ListObjectsResponse], error)
}

OpenFGAServiceHandler is an implementation of the openfga.v1.OpenFGAService service.

type UnimplementedOpenFGAServiceHandler

type UnimplementedOpenFGAServiceHandler struct{}

UnimplementedOpenFGAServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedOpenFGAServiceHandler) Check

func (UnimplementedOpenFGAServiceHandler) CreateStore

func (UnimplementedOpenFGAServiceHandler) DeleteStore

func (UnimplementedOpenFGAServiceHandler) Expand

func (UnimplementedOpenFGAServiceHandler) GetStore

func (UnimplementedOpenFGAServiceHandler) ListObjects

func (UnimplementedOpenFGAServiceHandler) ListStores

func (UnimplementedOpenFGAServiceHandler) Read

func (UnimplementedOpenFGAServiceHandler) ReadAssertions

func (UnimplementedOpenFGAServiceHandler) ReadAuthorizationModel

func (UnimplementedOpenFGAServiceHandler) ReadAuthorizationModels

func (UnimplementedOpenFGAServiceHandler) ReadChanges

func (UnimplementedOpenFGAServiceHandler) StreamedListObjects

func (UnimplementedOpenFGAServiceHandler) UpdateStore

func (UnimplementedOpenFGAServiceHandler) Write

func (UnimplementedOpenFGAServiceHandler) WriteAssertions

func (UnimplementedOpenFGAServiceHandler) WriteAuthorizationModel

Jump to

Keyboard shortcuts

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