insidesvc

package
v0.0.0-...-12b612f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoopIndexProperty = "insided_loop_index"
	FeatureIDProperty = "insided_fid"
	CellsInProperty   = "insided_cells_in"
	CellsOutProperty  = "insided_cells_out"
)

Variables

View Source
var (
	Geometry_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_POINT",
		2: "TYPE_POLYGON",
		3: "TYPE_MULTIPOLYGON",
		4: "TYPE_LINESTRING",
	}
	Geometry_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED":  0,
		"TYPE_POINT":        1,
		"TYPE_POLYGON":      2,
		"TYPE_MULTIPOLYGON": 3,
		"TYPE_LINESTRING":   4,
	}
)

Enum value maps for Geometry_Type.

View Source
var File_insidesvc_v1_insidesvc_proto protoreflect.FileDescriptor
View Source
var InsideService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "insidesvc.v1.InsideService",
	HandlerType: (*InsideServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Within",
			Handler:    _InsideService_Within_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _InsideService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "insidesvc/v1/insidesvc.proto",
}

InsideService_ServiceDesc is the grpc.ServiceDesc for InsideService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInsideServiceServer

func RegisterInsideServiceServer(s grpc.ServiceRegistrar, srv InsideServiceServer)

Types

type Feature

type Feature struct {
	Geometry   *Geometry                  `protobuf:"bytes,1,opt,name=geometry,proto3" json:"geometry,omitempty"`
	Properties map[string]*structpb.Value `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Feature) Descriptor deprecated

func (*Feature) Descriptor() ([]byte, []int)

Deprecated: Use Feature.ProtoReflect.Descriptor instead.

func (*Feature) GetGeometry

func (x *Feature) GetGeometry() *Geometry

func (*Feature) GetProperties

func (x *Feature) GetProperties() map[string]*structpb.Value

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) ProtoReflect

func (x *Feature) ProtoReflect() protoreflect.Message

func (*Feature) Reset

func (x *Feature) Reset()

func (*Feature) String

func (x *Feature) String() string

type FeatureResponse

type FeatureResponse struct {

	// id in the index
	Id      uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Feature *Feature `protobuf:"bytes,3,opt,name=feature,proto3" json:"feature,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureResponse) Descriptor deprecated

func (*FeatureResponse) Descriptor() ([]byte, []int)

Deprecated: Use FeatureResponse.ProtoReflect.Descriptor instead.

func (*FeatureResponse) GetFeature

func (x *FeatureResponse) GetFeature() *Feature

func (*FeatureResponse) GetId

func (x *FeatureResponse) GetId() uint32

func (*FeatureResponse) ProtoMessage

func (*FeatureResponse) ProtoMessage()

func (*FeatureResponse) ProtoReflect

func (x *FeatureResponse) ProtoReflect() protoreflect.Message

func (*FeatureResponse) Reset

func (x *FeatureResponse) Reset()

func (*FeatureResponse) String

func (x *FeatureResponse) String() string

type Geometry

type Geometry struct {
	Type        Geometry_Type `protobuf:"varint,1,opt,name=type,proto3,enum=insidesvc.v1.Geometry_Type" json:"type,omitempty"`
	Geometries  []*Geometry   `protobuf:"bytes,2,rep,name=geometries,proto3" json:"geometries,omitempty"`
	Coordinates []float64     `protobuf:"fixed64,3,rep,packed,name=coordinates,proto3" json:"coordinates,omitempty"`
	// contains filtered or unexported fields
}

func (*Geometry) Descriptor deprecated

func (*Geometry) Descriptor() ([]byte, []int)

Deprecated: Use Geometry.ProtoReflect.Descriptor instead.

func (*Geometry) GetCoordinates

func (x *Geometry) GetCoordinates() []float64

func (*Geometry) GetGeometries

func (x *Geometry) GetGeometries() []*Geometry

func (*Geometry) GetType

func (x *Geometry) GetType() Geometry_Type

func (*Geometry) ProtoMessage

func (*Geometry) ProtoMessage()

func (*Geometry) ProtoReflect

func (x *Geometry) ProtoReflect() protoreflect.Message

func (*Geometry) Reset

func (x *Geometry) Reset()

func (*Geometry) String

func (x *Geometry) String() string

type Geometry_Type

type Geometry_Type int32
const (
	Geometry_TYPE_UNSPECIFIED  Geometry_Type = 0
	Geometry_TYPE_POINT        Geometry_Type = 1
	Geometry_TYPE_POLYGON      Geometry_Type = 2
	Geometry_TYPE_MULTIPOLYGON Geometry_Type = 3
	Geometry_TYPE_LINESTRING   Geometry_Type = 4
)

func (Geometry_Type) Descriptor

func (Geometry_Type) Enum

func (x Geometry_Type) Enum() *Geometry_Type

func (Geometry_Type) EnumDescriptor deprecated

func (Geometry_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Geometry_Type.Descriptor instead.

func (Geometry_Type) Number

func (Geometry_Type) String

func (x Geometry_Type) String() string

func (Geometry_Type) Type

type GetRequest

type GetRequest struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// internally stored as uint16
	LoopIndex uint32 `protobuf:"varint,2,opt,name=loop_index,json=loopIndex,proto3" json:"loop_index,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() uint32

func (*GetRequest) GetLoopIndex

func (x *GetRequest) GetLoopIndex() uint32

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Id      uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Feature *Feature `protobuf:"bytes,2,opt,name=feature,proto3" json:"feature,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetFeature

func (x *GetResponse) GetFeature() *Feature

func (*GetResponse) GetId

func (x *GetResponse) GetId() uint32

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

func (x *GetResponse) ProtoReflect() protoreflect.Message

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type InsideServiceClient

type InsideServiceClient interface {
	//  Stab returns features containing lat lng
	Within(ctx context.Context, in *WithinRequest, opts ...grpc.CallOption) (*WithinResponse, error)
	// Get returns a feature by its internal ID and polygon index
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}

InsideServiceClient is the client API for InsideService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type InsideServiceServer

type InsideServiceServer interface {
	//  Stab returns features containing lat lng
	Within(context.Context, *WithinRequest) (*WithinResponse, error)
	// Get returns a feature by its internal ID and polygon index
	Get(context.Context, *GetRequest) (*GetResponse, error)
}

InsideServiceServer is the server API for InsideService service. All implementations should embed UnimplementedInsideServiceServer for forward compatibility

type Point

type Point struct {
	Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"`
	Lng float64 `protobuf:"fixed64,2,opt,name=lng,proto3" json:"lng,omitempty"`
	// contains filtered or unexported fields
}

func (*Point) Descriptor deprecated

func (*Point) Descriptor() ([]byte, []int)

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetLat

func (x *Point) GetLat() float64

func (*Point) GetLng

func (x *Point) GetLng() float64

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) ProtoReflect

func (x *Point) ProtoReflect() protoreflect.Message

func (*Point) Reset

func (x *Point) Reset()

func (*Point) String

func (x *Point) String() string

type UnimplementedInsideServiceServer

type UnimplementedInsideServiceServer struct {
}

UnimplementedInsideServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedInsideServiceServer) Get

func (UnimplementedInsideServiceServer) Within

type UnsafeInsideServiceServer

type UnsafeInsideServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeInsideServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InsideServiceServer will result in compilation errors.

type WithinRequest

type WithinRequest struct {
	Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"`
	Lng float64 `protobuf:"fixed64,2,opt,name=lng,proto3" json:"lng,omitempty"`
	// return features geometries or not
	// saving extra bytes
	RemoveGeometries bool `protobuf:"varint,3,opt,name=remove_geometries,json=removeGeometries,proto3" json:"remove_geometries,omitempty"`
	// remove the whole feature reponse
	RemoveFeature bool `protobuf:"varint,4,opt,name=remove_feature,json=removeFeature,proto3" json:"remove_feature,omitempty"`
	// contains filtered or unexported fields
}

func (*WithinRequest) Descriptor deprecated

func (*WithinRequest) Descriptor() ([]byte, []int)

Deprecated: Use WithinRequest.ProtoReflect.Descriptor instead.

func (*WithinRequest) GetLat

func (x *WithinRequest) GetLat() float64

func (*WithinRequest) GetLng

func (x *WithinRequest) GetLng() float64

func (*WithinRequest) GetRemoveFeature

func (x *WithinRequest) GetRemoveFeature() bool

func (*WithinRequest) GetRemoveGeometries

func (x *WithinRequest) GetRemoveGeometries() bool

func (*WithinRequest) ProtoMessage

func (*WithinRequest) ProtoMessage()

func (*WithinRequest) ProtoReflect

func (x *WithinRequest) ProtoReflect() protoreflect.Message

func (*WithinRequest) Reset

func (x *WithinRequest) Reset()

func (*WithinRequest) String

func (x *WithinRequest) String() string

type WithinResponse

type WithinResponse struct {
	Point     *Point             `protobuf:"bytes,1,opt,name=point,proto3" json:"point,omitempty"`
	Responses []*FeatureResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

func (*WithinResponse) Descriptor deprecated

func (*WithinResponse) Descriptor() ([]byte, []int)

Deprecated: Use WithinResponse.ProtoReflect.Descriptor instead.

func (*WithinResponse) GetPoint

func (x *WithinResponse) GetPoint() *Point

func (*WithinResponse) GetResponses

func (x *WithinResponse) GetResponses() []*FeatureResponse

func (*WithinResponse) ProtoMessage

func (*WithinResponse) ProtoMessage()

func (*WithinResponse) ProtoReflect

func (x *WithinResponse) ProtoReflect() protoreflect.Message

func (*WithinResponse) Reset

func (x *WithinResponse) Reset()

func (*WithinResponse) String

func (x *WithinResponse) String() string

Jump to

Keyboard shortcuts

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