Hide hidden Secrets functions from package, put under Pages module namespace.

This commit is contained in:
Dillon Kearns 2019-12-11 06:07:08 -08:00
parent fa7ac18fc1
commit 022e9e9016
3 changed files with 42 additions and 5 deletions

View File

@ -11,7 +11,7 @@
"Pages.ImagePath",
"Pages.PagePath",
"StaticHttp",
"Secrets",
"Pages.Secrets",
"Pages.Directory",
"Pages.Platform",
"Pages.Internal",

36
src/Pages/Secrets.elm Normal file
View File

@ -0,0 +1,36 @@
module Pages.Secrets exposing (Value, map, succeed, with)
{-| TODO
@docs Value, map, succeed, with
-}
import Secrets
{-| TODO
-}
type alias Value value =
Secrets.Value value
{-| TODO
-}
succeed : value -> Value value
succeed =
Secrets.succeed
{-| TODO
-}
map : (valueA -> valueB) -> Value valueA -> Value valueB
map =
Secrets.map
{-| TODO
-}
with : String -> Value (String -> value) -> Value value
with =
Secrets.with

View File

@ -24,6 +24,7 @@ module StaticHttp exposing
import Dict exposing (Dict)
import Dict.Extra
import Json.Decode.Exploration as Decode exposing (Decoder)
import Pages.Secrets
import Pages.StaticHttpRequest exposing (Request(..))
import Secrets
@ -189,7 +190,7 @@ lookup requestInfo rawResponses =
Ok ( rawResponses, value )
addUrls : List (Secrets.Value { url : String, method : String, headers : List ( String, String ) }) -> Pages.StaticHttpRequest.Request value -> Pages.StaticHttpRequest.Request value
addUrls : List (Pages.Secrets.Value { url : String, method : String, headers : List ( String, String ) }) -> Pages.StaticHttpRequest.Request value -> Pages.StaticHttpRequest.Request value
addUrls urlsToAdd requestInfo =
case requestInfo of
Request ( initialUrls, function ) ->
@ -199,7 +200,7 @@ addUrls urlsToAdd requestInfo =
Done value
lookupUrls : Pages.StaticHttpRequest.Request value -> List (Secrets.Value RequestDetails)
lookupUrls : Pages.StaticHttpRequest.Request value -> List (Pages.Secrets.Value RequestDetails)
lookupUrls requestInfo =
case requestInfo of
Request ( urls, lookupFn ) ->
@ -244,7 +245,7 @@ succeed value =
{-| TODO
-}
get :
Secrets.Value String
Pages.Secrets.Value String
-> Decoder a
-> Request a
get url decoder =
@ -279,7 +280,7 @@ requestToString requestDetails =
{-| TODO
-}
request :
Secrets.Value RequestDetails
Pages.Secrets.Value RequestDetails
-> Decoder a
-> Request a
request urlWithSecrets decoder =