operationsv1connect

package
v1.16.1-20240417131334... Latest Latest
Warning

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

Go to latest
Published: unknown License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LocationServiceIsOperationAllowedProcedure is the fully-qualified name of the LocationService's
	// isOperationAllowed RPC.
	LocationServiceIsOperationAllowedProcedure = "/linq.geo.operations.v1.LocationService/isOperationAllowed"
)

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 (
	// LocationServiceName is the fully-qualified name of the LocationService service.
	LocationServiceName = "linq.geo.operations.v1.LocationService"
)

Variables

This section is empty.

Functions

func NewLocationServiceHandler

func NewLocationServiceHandler(svc LocationServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewLocationServiceHandler 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 LocationServiceClient

type LocationServiceClient interface {
	// checks based on internal rules and user
	// location is requested operation allowed
	IsOperationAllowed(context.Context, *connect.Request[v1.AccessRequest]) (*connect.Response[v1.Access], error)
}

LocationServiceClient is a client for the linq.geo.operations.v1.LocationService service.

func NewLocationServiceClient

func NewLocationServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) LocationServiceClient

NewLocationServiceClient constructs a client for the linq.geo.operations.v1.LocationService 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 LocationServiceHandler

type LocationServiceHandler interface {
	// checks based on internal rules and user
	// location is requested operation allowed
	IsOperationAllowed(context.Context, *connect.Request[v1.AccessRequest]) (*connect.Response[v1.Access], error)
}

LocationServiceHandler is an implementation of the linq.geo.operations.v1.LocationService service.

type UnimplementedLocationServiceHandler

type UnimplementedLocationServiceHandler struct{}

UnimplementedLocationServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedLocationServiceHandler) IsOperationAllowed

Jump to

Keyboard shortcuts

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