Documentation ¶
Overview ¶
Index ¶
- Variables
- func Encode(path []Point, precision int) string
- type NullPoint
- func (s NullPoint) IsZero() bool
- func (s NullPoint) MarshalJSON() ([]byte, error)
- func (s NullPoint) MarshalText() ([]byte, error)
- func (s NullPoint) Ptr() *Point
- func (s *NullPoint) Randomize(nextInt func() int64, fieldType string, shouldBeNull bool)
- func (np *NullPoint) Scan(val interface{}) error
- func (s *NullPoint) SetValid(v Point)
- func (s *NullPoint) UnmarshalJSON(data []byte) error
- func (s *NullPoint) UnmarshalText(text []byte) error
- func (np NullPoint) Value() (driver.Value, error)
- type Point
Constants ¶
This section is empty.
Variables ¶
var NullBytes = []byte("null")
NullBytes is a global byte slice of JSON null
Functions ¶
Types ¶
type NullPoint ¶
func NewNullPoint ¶
NewNullPoint creates a new NullPoint
func NullPointFrom ¶
NullPointFrom creates a new NullPoint that will never be blank.
func NullPointFromPtr ¶
NullPointFromPtr creates a new NullPoint that be null if s is nil.
func (NullPoint) IsZero ¶
IsZero returns true for null Points, for potential future omitempty support.
func (NullPoint) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (NullPoint) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (NullPoint) Ptr ¶
Ptr returns a pointer to this NullPoint's value, or a nil pointer if this NullPoint is null.
func (*NullPoint) SetValid ¶
SetValid changes this NullPoint's value and also sets it to be non-null.
func (*NullPoint) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*NullPoint) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Point ¶
func (Point) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Point) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.