Add internal Vault type

2-transfer-tools
Bram 2023-12-18 01:32:21 +01:00
parent 5293eb4003
commit 8b7b2aa312
3 changed files with 43 additions and 1 deletions

View File

@ -14,7 +14,9 @@
"Internal.Tools.Iddict",
"Internal.Tools.Timestamp",
"Internal.Tools.VersionControl",
"Internal.Values.Envelope"
"Internal.Values.Envelope",
"Internal.Values.Vault",
"Types"
],
"elm-version": "0.19.0 <= v < 0.20.0",
"dependencies": {

View File

@ -0,0 +1,15 @@
module Internal.Values.Vault exposing (Vault)
{-| This module hosts the Vault module.
@docs Vault
-}
import Internal.Values.Envelope as Envelope
{-| This is the Vault type.
-}
type alias Vault =
Envelope.Envelope {}

25
src/Types.elm Normal file
View File

@ -0,0 +1,25 @@
module Types exposing (Vault(..))
{-| The Elm SDK uses a lot of records and values that are easy to manipulate.
Yet, the [Elm design guidelines](https://package.elm-lang.org/help/design-guidelines#keep-tags-and-record-constructors-secret)
highly recommend using opaque types in order to avoid breaking everyone's code
in a future major release.
This module forms as a protective layer between the internal modules and the
exposed modules, hiding all exposed types behind opaque types so the user cannot
access their content directly.
The opaque types are placed in a central module so all exposed modules can
safely access all exposed data types without risking to create circular imports.
@docs Vault
-}
import Internal.Values.Vault as Vault
{-| Opaque type for Matrix Vault
-}
type Vault
= Vault Vault.Vault