lbs

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 13 Imported by: 1 module, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

LBS( Location Based Service)

Supported db:

  • mysql

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGeoNotPoint = errors.New("geometry is not a point")
)
View Source
var File_address_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Address

type Address struct {
	Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"`
	Region  string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
	// State or province
	State   string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	City    string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"`
	ZipCode string `protobuf:"bytes,5,opt,name=zip_code,json=zipCode,proto3" json:"zip_code,omitempty"`
	Line1   string `protobuf:"bytes,6,opt,name=line1,proto3" json:"line1,omitempty"`
	Line2   string `protobuf:"bytes,7,opt,name=line2,proto3" json:"line2,omitempty"`
	Line3   string `protobuf:"bytes,8,opt,name=line3,proto3" json:"line3,omitempty"`
	// Geo geojson
	Geo *structpb.Struct `protobuf:"bytes,100,opt,name=geo,proto3" json:"geo,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetCity

func (x *Address) GetCity() string

func (*Address) GetCountry

func (x *Address) GetCountry() string

func (*Address) GetGeo

func (x *Address) GetGeo() *structpb.Struct

func (*Address) GetLine1

func (x *Address) GetLine1() string

func (*Address) GetLine2

func (x *Address) GetLine2() string

func (*Address) GetLine3

func (x *Address) GetLine3() string

func (*Address) GetRegion

func (x *Address) GetRegion() string

func (*Address) GetState

func (x *Address) GetState() string

func (*Address) GetZipCode

func (x *Address) GetZipCode() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type AddressEntity

type AddressEntity struct {
	Country string
	Region  string
	//State or province
	State   string
	City    string
	ZipCode string
	Line1   string
	Line2   string
	Line3   string
	Geo     *Point
}

func NewAddressEntityFromPb

func NewAddressEntityFromPb(s *Address) (*AddressEntity, error)

func (*AddressEntity) ToPb

func (s *AddressEntity) ToPb() (*Address, error)

type Point

type Point struct {
	Point wkb.Point
}

Point wrap wkb.Point

https://stackoverflow.com/a/60577841

func NewPoint

func NewPoint(p *geom.Point) *Point

func (*Point) GormDataType

func (p *Point) GormDataType() string

GormDataType ...

func (*Point) Scan

func (p *Point) Scan(src interface{}) error

func (*Point) Value

func (p *Point) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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