Ecto IP Range v0.1.0 EctoIPRange.IP4R View Source
Struct for PostgreSQL :ip4r
.
Usage
When used during a changeset cast the following values are accepted:
:inet.ip4_address()
: an IP4 tuple, e.g.{127, 0, 0, 1}
(single address only)binary
"127.0.0.1"
: single address"127.0.0.0/24"
: CIDR notation for a range from127.0.0.0
to127.0.0.255
"127.0.0.1-127.0.0.2"
: arbitrary range
EctoIPRange.IP4R.t()
: a pre-casted struct
Fields
range
first_ip
last_ip
Link to this section Summary
Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Link to this section Types
Link to this type
t()
View Sourcet() :: %EctoIPRange.IP4R{ first_ip: :inet.ip4_address(), last_ip: :inet.ip4_address(), range: binary() }
Link to this section Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.