# PGSecret
[![Hex.pm](https://img.shields.io/hexpm/v/pg_secret.svg)](https://hex.pm/packages/pg_secret)
PGSecret defines a custom `Postgrex` extension for the PostgreSQL extension of the same name.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `pg_secret` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:pg_secret, "~> 0.1.0"}
]
end
```
## Usage
### Directly in Postgrex
```elixir
Postgrex.Types.define(
MyApp.PostgrexTypes,
[PGSecret.Extension]
)
```
### Ecto
```elixir
#Add extensions to your repo config
config :thanks, Repo,
database: "secrets",
username: "postgres",
password: "postgres",
hostname: "localhost",
adapter: Ecto.Adapters.Postgres,
types: MyApp.PostgresTypes
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/pg_secret](https://hexdocs.pm/pg_secret).