diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-09-22 07:33:02 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-09-22 07:33:02 +0200 |
| commit | 840290491f45157249ba97fb8f5e4cae9e04dc90 (patch) | |
| tree | 0bc54eb0aa3ec248145e725ec963c81c045f586c /app/SlackBuilder/Config.hs | |
| parent | a7114618c1290b00745db69ef0e60b2e848a662d (diff) | |
| download | slackbuilder-840290491f45157249ba97fb8f5e4cae9e04dc90.tar.gz | |
Split the code into library and application
Diffstat (limited to 'app/SlackBuilder/Config.hs')
| -rw-r--r-- | app/SlackBuilder/Config.hs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/app/SlackBuilder/Config.hs b/app/SlackBuilder/Config.hs deleted file mode 100644 index c2a7f0b..0000000 --- a/app/SlackBuilder/Config.hs +++ /dev/null @@ -1,37 +0,0 @@ -module SlackBuilder.Config - ( Settings(..) - , MaintainerSettings(..) - , settingsCodec - ) where - -import Data.Text (Text) -import Toml ((.=)) -import qualified Toml - -data Settings = Settings - { ghToken :: !Text - , repository :: !FilePath - , branch :: Text - , downloadURL :: Text - , remotePath :: Text - , maintainer :: MaintainerSettings - } deriving (Eq, Show) - -data MaintainerSettings = MaintainerSettings - { name :: !Text - , email :: !Text - } deriving (Eq, Show) - -settingsCodec :: Toml.TomlCodec Settings -settingsCodec = Settings - <$> Toml.text "gh_token" .= ghToken - <*> Toml.string "repository" .= repository - <*> Toml.text "branch" .= branch - <*> Toml.text "download_url" .= downloadURL - <*> Toml.text "remote_path" .= remotePath - <*> Toml.table maintainerSettingsCodec "maintainer" .= maintainer - -maintainerSettingsCodec :: Toml.TomlCodec MaintainerSettings -maintainerSettingsCodec = MaintainerSettings - <$> Toml.text "name" .= name - <*> Toml.text "email" .= email |
