PGSecret
PGSecret defines a custom Postgrex extension for the PostgreSQL extension of the same name.
Installation
If available in Hex, the package can be installed
by adding pg_secret to your list of dependencies in mix.exs:
def deps do
[
{:pg_secret, "~> 0.1.0"}
]
endUsage
Directly in Postgrex
Postgrex.Types.define(
MyApp.PostgrexTypes,
[PGSecret.Extension]
)Ecto
#Add extensions to your repo config
config :thanks, Repo,
database: "secrets",
username: "postgres",
password: "postgres",
hostname: "localhost",
adapter: Ecto.Adapters.Postgres,
types: MyApp.PostgresTypesDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/pg_secret.