View Source EctoIPRange.IP4R (Ecto IP Range v0.2.0)
Struct for PostgreSQL :ip4r fields.
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.0to127.0.0.255"127.0.0.1-127.0.0.2": arbitrary range
EctoIPRange.IP4R.t(): a pre-casted struct
Fields
rangefirst_iplast_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
Specs
t() :: %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.