polypbv1

package
v0.0.0-...-ced6e2a Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CompressMethod_name = map[int32]string{
		0: "COMPRESS_METHOD_UNSPECIFIED",
		1: "COMPRESS_METHOD_POLYLINE",
	}
	CompressMethod_value = map[string]int32{
		"COMPRESS_METHOD_UNSPECIFIED": 0,
		"COMPRESS_METHOD_POLYLINE":    1,
	}
)

Enum value maps for CompressMethod.

View Source
var File_polypb_v1_polypb_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CompressMethod

type CompressMethod int32
const (
	CompressMethod_COMPRESS_METHOD_UNSPECIFIED CompressMethod = 0
	CompressMethod_COMPRESS_METHOD_POLYLINE    CompressMethod = 1 // https://developers.google.com/maps/documentation/utilities/polylinealgorithm
)

func (CompressMethod) Descriptor

func (CompressMethod) Enum

func (x CompressMethod) Enum() *CompressMethod

func (CompressMethod) EnumDescriptor deprecated

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

Deprecated: Use CompressMethod.Descriptor instead.

func (CompressMethod) Number

func (CompressMethod) String

func (x CompressMethod) String() string

func (CompressMethod) Type

type CompressedPolygon

type CompressedPolygon struct {
	Points []byte               `protobuf:"bytes,1,opt,name=points,proto3" json:"points,omitempty"`
	Holes  []*CompressedPolygon `protobuf:"bytes,2,rep,name=holes,proto3" json:"holes,omitempty"`
	// contains filtered or unexported fields
}

func (*CompressedPolygon) Descriptor deprecated

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

Deprecated: Use CompressedPolygon.ProtoReflect.Descriptor instead.

func (*CompressedPolygon) GetHoles

func (x *CompressedPolygon) GetHoles() []*CompressedPolygon

func (*CompressedPolygon) GetPoints

func (x *CompressedPolygon) GetPoints() []byte

func (*CompressedPolygon) ProtoMessage

func (*CompressedPolygon) ProtoMessage()

func (*CompressedPolygon) ProtoReflect

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

func (*CompressedPolygon) Reset

func (x *CompressedPolygon) Reset()

func (*CompressedPolygon) String

func (x *CompressedPolygon) String() string

func (*CompressedPolygon) Validate

func (m *CompressedPolygon) Validate() error

Validate checks the field values on CompressedPolygon with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CompressedPolygon) ValidateAll

func (m *CompressedPolygon) ValidateAll() error

ValidateAll checks the field values on CompressedPolygon with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CompressedPolygonMultiError, or nil if none found.

type CompressedPolygonMultiError

type CompressedPolygonMultiError []error

CompressedPolygonMultiError is an error wrapping multiple validation errors returned by CompressedPolygon.ValidateAll() if the designated constraints aren't met.

func (CompressedPolygonMultiError) AllErrors

func (m CompressedPolygonMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CompressedPolygonMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CompressedPolygonValidationError

type CompressedPolygonValidationError struct {
	// contains filtered or unexported fields
}

CompressedPolygonValidationError is the validation error returned by CompressedPolygon.Validate if the designated constraints aren't met.

func (CompressedPolygonValidationError) Cause

Cause function returns cause value.

func (CompressedPolygonValidationError) Error

Error satisfies the builtin error interface

func (CompressedPolygonValidationError) ErrorName

ErrorName returns error name.

func (CompressedPolygonValidationError) Field

Field function returns field value.

func (CompressedPolygonValidationError) Key

Key function returns key value.

func (CompressedPolygonValidationError) Reason

Reason function returns reason value.

type CompressedShape

type CompressedShape struct {
	Polygons []*CompressedPolygon `protobuf:"bytes,1,rep,name=polygons,proto3" json:"polygons,omitempty"`
	Data     []byte               `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

CompressedShape designed for binary file as small as possible.

func (*CompressedShape) Descriptor deprecated

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

Deprecated: Use CompressedShape.ProtoReflect.Descriptor instead.

func (*CompressedShape) GetData

func (x *CompressedShape) GetData() []byte

func (*CompressedShape) GetPolygons

func (x *CompressedShape) GetPolygons() []*CompressedPolygon

func (*CompressedShape) ProtoMessage

func (*CompressedShape) ProtoMessage()

func (*CompressedShape) ProtoReflect

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

func (*CompressedShape) Reset

func (x *CompressedShape) Reset()

func (*CompressedShape) String

func (x *CompressedShape) String() string

func (*CompressedShape) Validate

func (m *CompressedShape) Validate() error

Validate checks the field values on CompressedShape with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CompressedShape) ValidateAll

func (m *CompressedShape) ValidateAll() error

ValidateAll checks the field values on CompressedShape with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CompressedShapeMultiError, or nil if none found.

type CompressedShapeMultiError

type CompressedShapeMultiError []error

CompressedShapeMultiError is an error wrapping multiple validation errors returned by CompressedShape.ValidateAll() if the designated constraints aren't met.

func (CompressedShapeMultiError) AllErrors

func (m CompressedShapeMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CompressedShapeMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CompressedShapeValidationError

type CompressedShapeValidationError struct {
	// contains filtered or unexported fields
}

CompressedShapeValidationError is the validation error returned by CompressedShape.Validate if the designated constraints aren't met.

func (CompressedShapeValidationError) Cause

Cause function returns cause value.

func (CompressedShapeValidationError) Error

Error satisfies the builtin error interface

func (CompressedShapeValidationError) ErrorName

func (e CompressedShapeValidationError) ErrorName() string

ErrorName returns error name.

func (CompressedShapeValidationError) Field

Field function returns field value.

func (CompressedShapeValidationError) Key

Key function returns key value.

func (CompressedShapeValidationError) Reason

Reason function returns reason value.

type CompressedShapes

type CompressedShapes struct {
	Method  CompressMethod     `protobuf:"varint,1,opt,name=method,proto3,enum=polypb.v1.CompressMethod" json:"method,omitempty"`
	Shapes  []*CompressedShape `protobuf:"bytes,2,rep,name=shapes,proto3" json:"shapes,omitempty"`
	Version string             `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*CompressedShapes) Descriptor deprecated

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

Deprecated: Use CompressedShapes.ProtoReflect.Descriptor instead.

func (*CompressedShapes) GetMethod

func (x *CompressedShapes) GetMethod() CompressMethod

func (*CompressedShapes) GetShapes

func (x *CompressedShapes) GetShapes() []*CompressedShape

func (*CompressedShapes) GetVersion

func (x *CompressedShapes) GetVersion() string

func (*CompressedShapes) ProtoMessage

func (*CompressedShapes) ProtoMessage()

func (*CompressedShapes) ProtoReflect

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

func (*CompressedShapes) Reset

func (x *CompressedShapes) Reset()

func (*CompressedShapes) String

func (x *CompressedShapes) String() string

func (*CompressedShapes) Validate

func (m *CompressedShapes) Validate() error

Validate checks the field values on CompressedShapes with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CompressedShapes) ValidateAll

func (m *CompressedShapes) ValidateAll() error

ValidateAll checks the field values on CompressedShapes with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CompressedShapesMultiError, or nil if none found.

type CompressedShapesMultiError

type CompressedShapesMultiError []error

CompressedShapesMultiError is an error wrapping multiple validation errors returned by CompressedShapes.ValidateAll() if the designated constraints aren't met.

func (CompressedShapesMultiError) AllErrors

func (m CompressedShapesMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CompressedShapesMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CompressedShapesValidationError

type CompressedShapesValidationError struct {
	// contains filtered or unexported fields
}

CompressedShapesValidationError is the validation error returned by CompressedShapes.Validate if the designated constraints aren't met.

func (CompressedShapesValidationError) Cause

Cause function returns cause value.

func (CompressedShapesValidationError) Error

Error satisfies the builtin error interface

func (CompressedShapesValidationError) ErrorName

ErrorName returns error name.

func (CompressedShapesValidationError) Field

Field function returns field value.

func (CompressedShapesValidationError) Key

Key function returns key value.

func (CompressedShapesValidationError) Reason

Reason function returns reason value.

type Point

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

Basic Point data define.

func (*Point) Descriptor deprecated

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

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetLat

func (x *Point) GetLat() float32

func (*Point) GetLng

func (x *Point) GetLng() float32

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

func (*Point) Validate

func (m *Point) Validate() error

Validate checks the field values on Point with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Point) ValidateAll

func (m *Point) ValidateAll() error

ValidateAll checks the field values on Point with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PointMultiError, or nil if none found.

type PointMultiError

type PointMultiError []error

PointMultiError is an error wrapping multiple validation errors returned by Point.ValidateAll() if the designated constraints aren't met.

func (PointMultiError) AllErrors

func (m PointMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PointMultiError) Error

func (m PointMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PointValidationError

type PointValidationError struct {
	// contains filtered or unexported fields
}

PointValidationError is the validation error returned by Point.Validate if the designated constraints aren't met.

func (PointValidationError) Cause

func (e PointValidationError) Cause() error

Cause function returns cause value.

func (PointValidationError) Error

func (e PointValidationError) Error() string

Error satisfies the builtin error interface

func (PointValidationError) ErrorName

func (e PointValidationError) ErrorName() string

ErrorName returns error name.

func (PointValidationError) Field

func (e PointValidationError) Field() string

Field function returns field value.

func (PointValidationError) Key

func (e PointValidationError) Key() bool

Key function returns key value.

func (PointValidationError) Reason

func (e PointValidationError) Reason() string

Reason function returns reason value.

type Polygon

type Polygon struct {
	Points []*Point   `protobuf:"bytes,1,rep,name=points,proto3" json:"points,omitempty"` // define the "exterior ring"
	Holes  []*Polygon `protobuf:"bytes,2,rep,name=holes,proto3" json:"holes,omitempty"`   // define the "interior rings" as holes
	// contains filtered or unexported fields
}

Define a polygon, mostly based on GeoJSON's Polygon define.

Excerpt from RFC-9476 section 'Polygon'

  • A linear ring is a closed LineString with four or more positions.

  • The first and last positions are equivalent, and they MUST contain identical values; their representation SHOULD also be identical.

  • A linear ring is the boundary of a surface or the boundary of a hole in a surface.

  • A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.

    Note: the GJ2008 specification did not discuss linear ring winding order. For backwards compatibility, parsers SHOULD NOT reject Polygons that do not follow the right-hand rule.

    Though a linear ring is not explicitly represented as a GeoJSON geometry type, it leads to a canonical formulation of the Polygon geometry type definition as follows:

  • For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays.

  • For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings. The exterior ring bounds the surface, and the interior rings (if present) bound holes within the surface.

func (*Polygon) Descriptor deprecated

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

Deprecated: Use Polygon.ProtoReflect.Descriptor instead.

func (*Polygon) GetHoles

func (x *Polygon) GetHoles() []*Polygon

func (*Polygon) GetPoints

func (x *Polygon) GetPoints() []*Point

func (*Polygon) ProtoMessage

func (*Polygon) ProtoMessage()

func (*Polygon) ProtoReflect

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

func (*Polygon) Reset

func (x *Polygon) Reset()

func (*Polygon) String

func (x *Polygon) String() string

func (*Polygon) Validate

func (m *Polygon) Validate() error

Validate checks the field values on Polygon with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Polygon) ValidateAll

func (m *Polygon) ValidateAll() error

ValidateAll checks the field values on Polygon with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PolygonMultiError, or nil if none found.

type PolygonMultiError

type PolygonMultiError []error

PolygonMultiError is an error wrapping multiple validation errors returned by Polygon.ValidateAll() if the designated constraints aren't met.

func (PolygonMultiError) AllErrors

func (m PolygonMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PolygonMultiError) Error

func (m PolygonMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PolygonValidationError

type PolygonValidationError struct {
	// contains filtered or unexported fields
}

PolygonValidationError is the validation error returned by Polygon.Validate if the designated constraints aren't met.

func (PolygonValidationError) Cause

func (e PolygonValidationError) Cause() error

Cause function returns cause value.

func (PolygonValidationError) Error

func (e PolygonValidationError) Error() string

Error satisfies the builtin error interface

func (PolygonValidationError) ErrorName

func (e PolygonValidationError) ErrorName() string

ErrorName returns error name.

func (PolygonValidationError) Field

func (e PolygonValidationError) Field() string

Field function returns field value.

func (PolygonValidationError) Key

func (e PolygonValidationError) Key() bool

Key function returns key value.

func (PolygonValidationError) Reason

func (e PolygonValidationError) Reason() string

Reason function returns reason value.

type PreindexData

type PreindexData struct {
	X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	Z int32 `protobuf:"varint,3,opt,name=z,proto3" json:"z,omitempty"`
	// contains filtered or unexported fields
}

Preindex tile item.

The X/Y/Z are OSM style like map tile index values.

func (*PreindexData) Descriptor deprecated

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

Deprecated: Use PreindexData.ProtoReflect.Descriptor instead.

func (*PreindexData) GetX

func (x *PreindexData) GetX() int32

func (*PreindexData) GetY

func (x *PreindexData) GetY() int32

func (*PreindexData) GetZ

func (x *PreindexData) GetZ() int32

func (*PreindexData) ProtoMessage

func (*PreindexData) ProtoMessage()

func (*PreindexData) ProtoReflect

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

func (*PreindexData) Reset

func (x *PreindexData) Reset()

func (*PreindexData) String

func (x *PreindexData) String() string

func (*PreindexData) Validate

func (m *PreindexData) Validate() error

Validate checks the field values on PreindexData with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PreindexData) ValidateAll

func (m *PreindexData) ValidateAll() error

ValidateAll checks the field values on PreindexData with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PreindexDataMultiError, or nil if none found.

type PreindexDataMultiError

type PreindexDataMultiError []error

PreindexDataMultiError is an error wrapping multiple validation errors returned by PreindexData.ValidateAll() if the designated constraints aren't met.

func (PreindexDataMultiError) AllErrors

func (m PreindexDataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PreindexDataMultiError) Error

func (m PreindexDataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PreindexDataValidationError

type PreindexDataValidationError struct {
	// contains filtered or unexported fields
}

PreindexDataValidationError is the validation error returned by PreindexData.Validate if the designated constraints aren't met.

func (PreindexDataValidationError) Cause

Cause function returns cause value.

func (PreindexDataValidationError) Error

Error satisfies the builtin error interface

func (PreindexDataValidationError) ErrorName

func (e PreindexDataValidationError) ErrorName() string

ErrorName returns error name.

func (PreindexDataValidationError) Field

Field function returns field value.

func (PreindexDataValidationError) Key

Key function returns key value.

func (PreindexDataValidationError) Reason

Reason function returns reason value.

type PreindexShapes

type PreindexShapes struct {
	Version string          `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	IdxZoom int32           `protobuf:"varint,2,opt,name=idx_zoom,json=idxZoom,proto3" json:"idx_zoom,omitempty"` // which zoom value the tiles generated
	AggZoom int32           `protobuf:"varint,3,opt,name=agg_zoom,json=aggZoom,proto3" json:"agg_zoom,omitempty"` // which zoom value the tiles merge up with.
	Keys    []*PreindexData `protobuf:"bytes,4,rep,name=keys,proto3" json:"keys,omitempty"`
	Data    []byte          `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

PreindexShapes is all preindex for a polygon.

func (*PreindexShapes) Descriptor deprecated

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

Deprecated: Use PreindexShapes.ProtoReflect.Descriptor instead.

func (*PreindexShapes) GetAggZoom

func (x *PreindexShapes) GetAggZoom() int32

func (*PreindexShapes) GetData

func (x *PreindexShapes) GetData() []byte

func (*PreindexShapes) GetIdxZoom

func (x *PreindexShapes) GetIdxZoom() int32

func (*PreindexShapes) GetKeys

func (x *PreindexShapes) GetKeys() []*PreindexData

func (*PreindexShapes) GetVersion

func (x *PreindexShapes) GetVersion() string

func (*PreindexShapes) ProtoMessage

func (*PreindexShapes) ProtoMessage()

func (*PreindexShapes) ProtoReflect

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

func (*PreindexShapes) Reset

func (x *PreindexShapes) Reset()

func (*PreindexShapes) String

func (x *PreindexShapes) String() string

func (*PreindexShapes) Validate

func (m *PreindexShapes) Validate() error

Validate checks the field values on PreindexShapes with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PreindexShapes) ValidateAll

func (m *PreindexShapes) ValidateAll() error

ValidateAll checks the field values on PreindexShapes with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PreindexShapesMultiError, or nil if none found.

type PreindexShapesMultiError

type PreindexShapesMultiError []error

PreindexShapesMultiError is an error wrapping multiple validation errors returned by PreindexShapes.ValidateAll() if the designated constraints aren't met.

func (PreindexShapesMultiError) AllErrors

func (m PreindexShapesMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PreindexShapesMultiError) Error

func (m PreindexShapesMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PreindexShapesValidationError

type PreindexShapesValidationError struct {
	// contains filtered or unexported fields
}

PreindexShapesValidationError is the validation error returned by PreindexShapes.Validate if the designated constraints aren't met.

func (PreindexShapesValidationError) Cause

Cause function returns cause value.

func (PreindexShapesValidationError) Error

Error satisfies the builtin error interface

func (PreindexShapesValidationError) ErrorName

func (e PreindexShapesValidationError) ErrorName() string

ErrorName returns error name.

func (PreindexShapesValidationError) Field

Field function returns field value.

func (PreindexShapesValidationError) Key

Key function returns key value.

func (PreindexShapesValidationError) Reason

Reason function returns reason value.

type Shape

type Shape struct {
	Polygons []*Polygon `protobuf:"bytes,1,rep,name=polygons,proto3" json:"polygons,omitempty"` // As multi-polygon
	Data     []byte     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`         // Data for the polygon
	// contains filtered or unexported fields
}

func (*Shape) Descriptor deprecated

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

Deprecated: Use Shape.ProtoReflect.Descriptor instead.

func (*Shape) GetData

func (x *Shape) GetData() []byte

func (*Shape) GetPolygons

func (x *Shape) GetPolygons() []*Polygon

func (*Shape) ProtoMessage

func (*Shape) ProtoMessage()

func (*Shape) ProtoReflect

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

func (*Shape) Reset

func (x *Shape) Reset()

func (*Shape) String

func (x *Shape) String() string

func (*Shape) Validate

func (m *Shape) Validate() error

Validate checks the field values on Shape with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Shape) ValidateAll

func (m *Shape) ValidateAll() error

ValidateAll checks the field values on Shape with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ShapeMultiError, or nil if none found.

type ShapeMultiError

type ShapeMultiError []error

ShapeMultiError is an error wrapping multiple validation errors returned by Shape.ValidateAll() if the designated constraints aren't met.

func (ShapeMultiError) AllErrors

func (m ShapeMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ShapeMultiError) Error

func (m ShapeMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ShapeValidationError

type ShapeValidationError struct {
	// contains filtered or unexported fields
}

ShapeValidationError is the validation error returned by Shape.Validate if the designated constraints aren't met.

func (ShapeValidationError) Cause

func (e ShapeValidationError) Cause() error

Cause function returns cause value.

func (ShapeValidationError) Error

func (e ShapeValidationError) Error() string

Error satisfies the builtin error interface

func (ShapeValidationError) ErrorName

func (e ShapeValidationError) ErrorName() string

ErrorName returns error name.

func (ShapeValidationError) Field

func (e ShapeValidationError) Field() string

Field function returns field value.

func (ShapeValidationError) Key

func (e ShapeValidationError) Key() bool

Key function returns key value.

func (ShapeValidationError) Reason

func (e ShapeValidationError) Reason() string

Reason function returns reason value.

type Shapes

type Shapes struct {
	Shapes  []*Shape `protobuf:"bytes,1,rep,name=shapes,proto3" json:"shapes,omitempty"`
	Version int32    `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*Shapes) Descriptor deprecated

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

Deprecated: Use Shapes.ProtoReflect.Descriptor instead.

func (*Shapes) GetShapes

func (x *Shapes) GetShapes() []*Shape

func (*Shapes) GetVersion

func (x *Shapes) GetVersion() int32

func (*Shapes) ProtoMessage

func (*Shapes) ProtoMessage()

func (*Shapes) ProtoReflect

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

func (*Shapes) Reset

func (x *Shapes) Reset()

func (*Shapes) String

func (x *Shapes) String() string

func (*Shapes) Validate

func (m *Shapes) Validate() error

Validate checks the field values on Shapes with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Shapes) ValidateAll

func (m *Shapes) ValidateAll() error

ValidateAll checks the field values on Shapes with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ShapesMultiError, or nil if none found.

type ShapesMultiError

type ShapesMultiError []error

ShapesMultiError is an error wrapping multiple validation errors returned by Shapes.ValidateAll() if the designated constraints aren't met.

func (ShapesMultiError) AllErrors

func (m ShapesMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ShapesMultiError) Error

func (m ShapesMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ShapesValidationError

type ShapesValidationError struct {
	// contains filtered or unexported fields
}

ShapesValidationError is the validation error returned by Shapes.Validate if the designated constraints aren't met.

func (ShapesValidationError) Cause

func (e ShapesValidationError) Cause() error

Cause function returns cause value.

func (ShapesValidationError) Error

func (e ShapesValidationError) Error() string

Error satisfies the builtin error interface

func (ShapesValidationError) ErrorName

func (e ShapesValidationError) ErrorName() string

ErrorName returns error name.

func (ShapesValidationError) Field

func (e ShapesValidationError) Field() string

Field function returns field value.

func (ShapesValidationError) Key

func (e ShapesValidationError) Key() bool

Key function returns key value.

func (ShapesValidationError) Reason

func (e ShapesValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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