entityv1alpha1connect

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EntityServiceBatchUpdateProcedure is the fully-qualified name of the EntityService's BatchUpdate
	// RPC.
	EntityServiceBatchUpdateProcedure = "/commonfate.entity.v1alpha1.EntityService/BatchUpdate"
	// EntityServiceListProcedure is the fully-qualified name of the EntityService's List RPC.
	EntityServiceListProcedure = "/commonfate.entity.v1alpha1.EntityService/List"
	// EntityServiceGetProcedure is the fully-qualified name of the EntityService's Get RPC.
	EntityServiceGetProcedure = "/commonfate.entity.v1alpha1.EntityService/Get"
	// EntityServiceListChildrenProcedure is the fully-qualified name of the EntityService's
	// ListChildren RPC.
	EntityServiceListChildrenProcedure = "/commonfate.entity.v1alpha1.EntityService/ListChildren"
	// EntityServiceListParentsProcedure is the fully-qualified name of the EntityService's ListParents
	// RPC.
	EntityServiceListParentsProcedure = "/commonfate.entity.v1alpha1.EntityService/ListParents"
	// EntityServiceBatchGetProcedure is the fully-qualified name of the EntityService's BatchGet RPC.
	EntityServiceBatchGetProcedure = "/commonfate.entity.v1alpha1.EntityService/BatchGet"
	// EntityServiceSelectProcedure is the fully-qualified name of the EntityService's Select RPC.
	EntityServiceSelectProcedure = "/commonfate.entity.v1alpha1.EntityService/Select"
)

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 (
	// EntityServiceName is the fully-qualified name of the EntityService service.
	EntityServiceName = "commonfate.entity.v1alpha1.EntityService"
)

Variables

This section is empty.

Functions

func NewEntityServiceHandler

func NewEntityServiceHandler(svc EntityServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewEntityServiceHandler 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 EntityServiceClient

type EntityServiceClient interface {
	// creates or updates entities for a particular policy store in the authorization service.
	BatchUpdate(context.Context, *connect.Request[v1alpha1.BatchUpdateRequest]) (*connect.Response[v1alpha1.BatchUpdateResponse], error)
	// List entities matching filter conditions.
	List(context.Context, *connect.Request[v1alpha1.ListRequest]) (*connect.Response[v1alpha1.ListResponse], error)
	// Get an entity by EID.
	Get(context.Context, *connect.Request[v1alpha1.GetRequest]) (*connect.Response[v1alpha1.GetResponse], error)
	// List the children for a particular entity.
	ListChildren(context.Context, *connect.Request[v1alpha1.ListChildrenRequest]) (*connect.Response[v1alpha1.ListChildrenResponse], error)
	// List the parents for a particular entity.
	ListParents(context.Context, *connect.Request[v1alpha1.ListParentsRequest]) (*connect.Response[v1alpha1.ListParentsResponse], error)
	// Get multiple entities by EID.
	BatchGet(context.Context, *connect.Request[v1alpha1.BatchGetRequest]) (*connect.Response[v1alpha1.BatchGetResponse], error)
	Select(context.Context, *connect.Request[v1alpha1.SelectRequest]) (*connect.Response[v1alpha1.SelectResponse], error)
}

EntityServiceClient is a client for the commonfate.entity.v1alpha1.EntityService service.

func NewEntityServiceClient

func NewEntityServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EntityServiceClient

NewEntityServiceClient constructs a client for the commonfate.entity.v1alpha1.EntityService 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 EntityServiceHandler

type EntityServiceHandler interface {
	// creates or updates entities for a particular policy store in the authorization service.
	BatchUpdate(context.Context, *connect.Request[v1alpha1.BatchUpdateRequest]) (*connect.Response[v1alpha1.BatchUpdateResponse], error)
	// List entities matching filter conditions.
	List(context.Context, *connect.Request[v1alpha1.ListRequest]) (*connect.Response[v1alpha1.ListResponse], error)
	// Get an entity by EID.
	Get(context.Context, *connect.Request[v1alpha1.GetRequest]) (*connect.Response[v1alpha1.GetResponse], error)
	// List the children for a particular entity.
	ListChildren(context.Context, *connect.Request[v1alpha1.ListChildrenRequest]) (*connect.Response[v1alpha1.ListChildrenResponse], error)
	// List the parents for a particular entity.
	ListParents(context.Context, *connect.Request[v1alpha1.ListParentsRequest]) (*connect.Response[v1alpha1.ListParentsResponse], error)
	// Get multiple entities by EID.
	BatchGet(context.Context, *connect.Request[v1alpha1.BatchGetRequest]) (*connect.Response[v1alpha1.BatchGetResponse], error)
	Select(context.Context, *connect.Request[v1alpha1.SelectRequest]) (*connect.Response[v1alpha1.SelectResponse], error)
}

EntityServiceHandler is an implementation of the commonfate.entity.v1alpha1.EntityService service.

type UnimplementedEntityServiceHandler

type UnimplementedEntityServiceHandler struct{}

UnimplementedEntityServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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