Pike.Store.ETS (pike v0.3.0)
View SourceDefault in-memory ETS-based API key store for Pike.
Stores key structs with permissions like:
%{
key: "abc123",
enabled: true,
permissions: [
%{resource: "Products", scopes: [:read, :write]}
]
}Customizing the ETS Table
There are two ways to use a custom table name:
- Configure the default table name globally:
# In your config.exs
config :pike, :ets_table_name, :my_custom_table_name- Create a parameterized store with the
usemacro:
defmodule MyApp.CustomStore do
use Pike.Store.ETS, table_name: :my_custom_table
end
# Then configure Pike to use it
config :pike, store: MyApp.CustomStoreThis approach allows multiple Pike instances with separate ETS tables.