Documentation ¶
Overview ¶
Package binary provides functions for (un)marshaling cache data.
Package binary is a generated protocol buffer package. It is generated from these files: cache/binary/messages.proto It has these top-level messages: Node Way Relation DeltaCoords
Index ¶
- Variables
- func CoordToInt(coord float64) uint32
- func IntToCoord(coord uint32) float64
- func MarshalDeltaNodes(nodes []osm.Node, buf []byte) []byte
- func MarshalIDRefsBunch(idRefs []element.IDRefs) []byte
- func MarshalIDRefsBunch2(idRefs []element.IDRefs, buf []byte) []byte
- func MarshalNode(node *osm.Node) ([]byte, error)
- func MarshalRelation(relation *osm.Relation) ([]byte, error)
- func MarshalWay(way *osm.Way) ([]byte, error)
- func UnmarshalDeltaNodes(buf []byte, nodes []osm.Node) ([]osm.Node, error)
- func UnmarshalIDRefsBunch(buf []byte) []element.IDRefs
- func UnmarshalIDRefsBunch2(buf []byte, idRefs []element.IDRefs) []element.IDRefs
- func UnmarshalNode(data []byte) (node *osm.Node, err error)
- func UnmarshalRelation(data []byte) (relation *osm.Relation, err error)
- func UnmarshalWay(data []byte) (way *osm.Way, err error)
- type DeltaCoords
- func (*DeltaCoords) Descriptor() ([]byte, []int)
- func (m *DeltaCoords) GetIds() []int64
- func (m *DeltaCoords) GetLats() []int64
- func (m *DeltaCoords) GetLons() []int64
- func (m *DeltaCoords) Marshal() (dAtA []byte, err error)
- func (m *DeltaCoords) MarshalTo(dAtA []byte) (int, error)
- func (*DeltaCoords) ProtoMessage()
- func (m *DeltaCoords) Reset()
- func (m *DeltaCoords) Size() (n int)
- func (m *DeltaCoords) String() string
- func (m *DeltaCoords) Unmarshal(dAtA []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetLat() uint32
- func (m *Node) GetLong() uint32
- func (m *Node) GetTags() []string
- func (m *Node) Marshal() (dAtA []byte, err error)
- func (m *Node) MarshalTo(dAtA []byte) (int, error)
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) Size() (n int)
- func (m *Node) String() string
- func (m *Node) Unmarshal(dAtA []byte) error
- type Relation
- func (*Relation) Descriptor() ([]byte, []int)
- func (m *Relation) GetMemberIds() []int64
- func (m *Relation) GetMemberRoles() []string
- func (m *Relation) GetMemberTypes() []Relation_MemberType
- func (m *Relation) GetTags() []string
- func (m *Relation) Marshal() (dAtA []byte, err error)
- func (m *Relation) MarshalTo(dAtA []byte) (int, error)
- func (*Relation) ProtoMessage()
- func (m *Relation) Reset()
- func (m *Relation) Size() (n int)
- func (m *Relation) String() string
- func (m *Relation) Unmarshal(dAtA []byte) error
- type Relation_MemberType
- type Way
- func (*Way) Descriptor() ([]byte, []int)
- func (m *Way) GetRefs() []int64
- func (m *Way) GetTags() []string
- func (m *Way) Marshal() (dAtA []byte, err error)
- func (m *Way) MarshalTo(dAtA []byte) (int, error)
- func (*Way) ProtoMessage()
- func (m *Way) Reset()
- func (m *Way) Size() (n int)
- func (m *Way) String() string
- func (m *Way) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") )
View Source
var Relation_MemberType_name = map[int32]string{
0: "NodeMember",
1: "WayMember",
2: "RelationMember",
}
View Source
var Relation_MemberType_value = map[string]int32{
"NodeMember": 0,
"WayMember": 1,
"RelationMember": 2,
}
Functions ¶
func CoordToInt ¶
func IntToCoord ¶
func MarshalIDRefsBunch ¶ added in v0.7.0
func MarshalIDRefsBunch2 ¶ added in v0.7.0
func UnmarshalDeltaNodes ¶
func UnmarshalIDRefsBunch ¶ added in v0.7.0
func UnmarshalIDRefsBunch2 ¶ added in v0.7.0
Types ¶
type DeltaCoords ¶
type DeltaCoords struct { Ids []int64 `protobuf:"zigzag64,1,rep,packed,name=ids" json:"ids,omitempty"` Lats []int64 `protobuf:"zigzag64,2,rep,packed,name=lats" json:"lats,omitempty"` Lons []int64 `protobuf:"zigzag64,3,rep,packed,name=lons" json:"lons,omitempty"` }
func (*DeltaCoords) Descriptor ¶
func (*DeltaCoords) Descriptor() ([]byte, []int)
func (*DeltaCoords) GetIds ¶
func (m *DeltaCoords) GetIds() []int64
func (*DeltaCoords) GetLats ¶
func (m *DeltaCoords) GetLats() []int64
func (*DeltaCoords) GetLons ¶
func (m *DeltaCoords) GetLons() []int64
func (*DeltaCoords) Marshal ¶
func (m *DeltaCoords) Marshal() (dAtA []byte, err error)
func (*DeltaCoords) ProtoMessage ¶
func (*DeltaCoords) ProtoMessage()
func (*DeltaCoords) Reset ¶
func (m *DeltaCoords) Reset()
func (*DeltaCoords) Size ¶
func (m *DeltaCoords) Size() (n int)
func (*DeltaCoords) String ¶
func (m *DeltaCoords) String() string
func (*DeltaCoords) Unmarshal ¶
func (m *DeltaCoords) Unmarshal(dAtA []byte) error
type Node ¶
type Node struct { Long uint32 `protobuf:"varint,1,req,name=long" json:"long"` Lat uint32 `protobuf:"varint,2,req,name=lat" json:"lat"` Tags []string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty"` }
func (*Node) Descriptor ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type Relation ¶
type Relation struct { Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` MemberIds []int64 `protobuf:"varint,2,rep,name=member_ids,json=memberIds" json:"member_ids,omitempty"` MemberTypes []Relation_MemberType `protobuf:"varint,3,rep,name=member_types,json=memberTypes,enum=binary.Relation_MemberType" json:"member_types,omitempty"` MemberRoles []string `protobuf:"bytes,4,rep,name=member_roles,json=memberRoles" json:"member_roles,omitempty"` }
func (*Relation) Descriptor ¶
func (*Relation) GetMemberIds ¶
func (*Relation) GetMemberRoles ¶
func (*Relation) GetMemberTypes ¶
func (m *Relation) GetMemberTypes() []Relation_MemberType
func (*Relation) ProtoMessage ¶
func (*Relation) ProtoMessage()
type Relation_MemberType ¶
type Relation_MemberType int32
const ( Relation_NodeMember Relation_MemberType = 0 Relation_WayMember Relation_MemberType = 1 Relation_RelationMember Relation_MemberType = 2 )
func (Relation_MemberType) Enum ¶
func (x Relation_MemberType) Enum() *Relation_MemberType
func (Relation_MemberType) EnumDescriptor ¶
func (Relation_MemberType) EnumDescriptor() ([]byte, []int)
func (Relation_MemberType) String ¶
func (x Relation_MemberType) String() string
func (*Relation_MemberType) UnmarshalJSON ¶
func (x *Relation_MemberType) UnmarshalJSON(data []byte) error
type Way ¶
type Way struct { Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` Refs []int64 `protobuf:"varint,2,rep,packed,name=refs" json:"refs,omitempty"` }
func (*Way) Descriptor ¶
func (*Way) ProtoMessage ¶
func (*Way) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.