Documentation ¶
Index ¶
- Constants
- func NewConfigurationServiceHandler(svc ConfigurationServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewRestrictionsServiceHandler(svc RestrictionsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ConfigurationServiceClient
- type ConfigurationServiceHandler
- type RestrictionsServiceClient
- type RestrictionsServiceHandler
- type UnimplementedConfigurationServiceHandler
- type UnimplementedRestrictionsServiceHandler
Constants ¶
const ( // RestrictionsServiceName is the fully-qualified name of the RestrictionsService service. RestrictionsServiceName = "linq.geo.restrictions.v1.RestrictionsService" // ConfigurationServiceName is the fully-qualified name of the ConfigurationService service. ConfigurationServiceName = "linq.geo.restrictions.v1.ConfigurationService" )
const ( // RestrictionsServiceIsAccessAllowedProcedure is the fully-qualified name of the // RestrictionsService's isAccessAllowed RPC. RestrictionsServiceIsAccessAllowedProcedure = "/linq.geo.restrictions.v1.RestrictionsService/isAccessAllowed" // ConfigurationServiceGetAvoidedRegionsProcedure is the fully-qualified name of the // ConfigurationService's getAvoidedRegions RPC. ConfigurationServiceGetAvoidedRegionsProcedure = "/linq.geo.restrictions.v1.ConfigurationService/getAvoidedRegions" )
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.
Variables ¶
This section is empty.
Functions ¶
func NewConfigurationServiceHandler ¶
func NewConfigurationServiceHandler(svc ConfigurationServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewConfigurationServiceHandler 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.
func NewRestrictionsServiceHandler ¶
func NewRestrictionsServiceHandler(svc RestrictionsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewRestrictionsServiceHandler 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 ConfigurationServiceClient ¶
type ConfigurationServiceClient interface { // Returns list of avoided countries and regions // It returns separated list of blocked countries, // and additionally list of specific regions inside country // So it is possible that country is allowed, // but some its regions are restricted. GetAvoidedRegions(context.Context, *connect.Request[v1.RegionsConfigRequest]) (*connect.Response[v1.AvoidedRegionsResponse], error) }
ConfigurationServiceClient is a client for the linq.geo.restrictions.v1.ConfigurationService service.
func NewConfigurationServiceClient ¶
func NewConfigurationServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConfigurationServiceClient
NewConfigurationServiceClient constructs a client for the linq.geo.restrictions.v1.ConfigurationService 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 ConfigurationServiceHandler ¶
type ConfigurationServiceHandler interface { // Returns list of avoided countries and regions // It returns separated list of blocked countries, // and additionally list of specific regions inside country // So it is possible that country is allowed, // but some its regions are restricted. GetAvoidedRegions(context.Context, *connect.Request[v1.RegionsConfigRequest]) (*connect.Response[v1.AvoidedRegionsResponse], error) }
ConfigurationServiceHandler is an implementation of the linq.geo.restrictions.v1.ConfigurationService service.
type RestrictionsServiceClient ¶
type RestrictionsServiceClient interface { // returns is access allowed and detected locations details IsAccessAllowed(context.Context, *connect.Request[v1.AccessAppRequest]) (*connect.Response[v1.AccessStatus], error) }
RestrictionsServiceClient is a client for the linq.geo.restrictions.v1.RestrictionsService service.
func NewRestrictionsServiceClient ¶
func NewRestrictionsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RestrictionsServiceClient
NewRestrictionsServiceClient constructs a client for the linq.geo.restrictions.v1.RestrictionsService 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 RestrictionsServiceHandler ¶
type RestrictionsServiceHandler interface { // returns is access allowed and detected locations details IsAccessAllowed(context.Context, *connect.Request[v1.AccessAppRequest]) (*connect.Response[v1.AccessStatus], error) }
RestrictionsServiceHandler is an implementation of the linq.geo.restrictions.v1.RestrictionsService service.
type UnimplementedConfigurationServiceHandler ¶
type UnimplementedConfigurationServiceHandler struct{}
UnimplementedConfigurationServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedConfigurationServiceHandler) GetAvoidedRegions ¶
func (UnimplementedConfigurationServiceHandler) GetAvoidedRegions(context.Context, *connect.Request[v1.RegionsConfigRequest]) (*connect.Response[v1.AvoidedRegionsResponse], error)
type UnimplementedRestrictionsServiceHandler ¶
type UnimplementedRestrictionsServiceHandler struct{}
UnimplementedRestrictionsServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedRestrictionsServiceHandler) IsAccessAllowed ¶
func (UnimplementedRestrictionsServiceHandler) IsAccessAllowed(context.Context, *connect.Request[v1.AccessAppRequest]) (*connect.Response[v1.AccessStatus], error)