Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Box ¶ added in v0.0.7
Box contains the two opposing corners of a geometric box, matching Postgres' box type.
Please note that Postgresql will always place the upper right corner first - so X1/Y1 might be X2/Y2 when you read it back out - but the semantics are correct.
type IP ¶
IP represent an IP and an optional netmask/size. It is provided because while net/IP provides much of what is needed for marshalling to/from text and json, it doesn't provide a convenient netmask. And it doesn't implement database/sql's Scanner either. This type implements both MarshalText/UnmarshalText and Scan(), and to top it off: String(). this should ensure maximum usability.
func (IP) MarshalText ¶
MarshalText returns a text version of an ip using String, it is used by various encoders, including the JSON encoder.
func (*IP) String ¶
String returns a ip address in string format, with an optional /mask if the IP has a non-zero mask.
func (*IP) UnmarshalText ¶
UnmarshalText parses a byte string onto an IP structure. It is used by various encoders, including the JSON encoder.