Fields.IpAddressHash (fields v2.12.0)

Copy Markdown

An Ecto Type for hashed ip addresses. Hashed using sha256. See Fields.Helpers for hashing details.

Example

schema "users" do
  field(:ip_address_hash, Fields.IpAddressHash)
end

Summary

Functions

Callback implementation for Ecto.Type.cast/1.

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.

Functions

cast(value)

Callback implementation for Ecto.Type.cast/1.

dump(value)

Callback implementation for Ecto.Type.dump/1.

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.

load(value)

Callback implementation for Ecto.Type.load/1.

type()

Callback implementation for Ecto.Type.type/0.