latlonpb

package
v0.0.0-...-fcf2c48 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: BSD-4-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_genproto_latlon_v1_latlon_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type LatLon

type LatLon struct {
	Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"` // The latitude in degrees. It must be in the range [-90.0, +90.0].
	Lon float64 `protobuf:"fixed64,2,opt,name=lon,proto3" json:"lon,omitempty"` // The longitude in degrees. It must be in the range [-180.0, +180.0].
	// contains filtered or unexported fields
}

func (*LatLon) Descriptor deprecated

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

Deprecated: Use LatLon.ProtoReflect.Descriptor instead.

func (*LatLon) GetLat

func (x *LatLon) GetLat() float64

func (*LatLon) GetLon

func (x *LatLon) GetLon() float64

func (*LatLon) ProtoMessage

func (*LatLon) ProtoMessage()

func (*LatLon) ProtoReflect

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

func (*LatLon) Reset

func (x *LatLon) Reset()

func (*LatLon) String

func (x *LatLon) String() string

type LatLonValidator

type LatLonValidator interface {
	Validate(req *LatLon) []*errdetails.BadRequest_FieldViolation
	ValidateLat(lat_ float64) *errdetails.BadRequest_FieldViolation
	ValidateLon(lon_ float64) *errdetails.BadRequest_FieldViolation

	Optional() LatLonValidator
	WithRuleLat(rule validator.NumberRule[float64]) LatLonValidator
	WithRuleLon(rule validator.NumberRule[float64]) LatLonValidator
}

func NewLatLonValidator

func NewLatLonValidator() LatLonValidator

Jump to

Keyboard shortcuts

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