Rivet.Config (rivet v2.5.2)
View SourceOptional configurations can be specified as opts, or in the app environment
under the key :rivet
base_dir - base folder of the project, for pathing. Defaults to '.' lib_dir - lib folder from base of project. Default: "lib" test_dir - test folder from base of project. Default: "test" models_dir - sub-folder in lib_dir for models, default: "#{app_name}"
From this we generate:
base: - "Base.Module.Name" for models models_root: - relative path to base for new models. Generated as:
"#{lib_dir}/#{app_dir}/#{mod_dir}"
model_path: - relative path to model base folder
"#{models_root}/#{model_base_name}
tests_root: - relative path to base test folder
"#{test_dir}/#{app_dir}/#{mod_dir}"
test_path: - relative path to model test folder
"#{tests_root}/#{model_base_name}"
base_path: - base folder for project
Summary
Types
@type rivet_migration_input_any() :: rivet_migration_input_include() | rivet_migration_input_external() | rivet_migration_input_model()
@type rivet_migration_input_external() :: %{ external: String.t(), migrations: [rivet_migration_input_include()] }
@type rivet_migration_input_model() :: map()
@type rivet_migration_state() :: %{ idx: %{required(integer()) => Rivet.Migration.t()}, mods: %{required(atom()) => list()} }
@type rivet_migrations() :: [Rivet.Migration.t()]
@type rivet_state_result() :: {:ok, rivet_migration_state()} | rivet_error()