Rerouted (regenerated, verified). Same repository and tag, but GitHub now builds the zip with different bytes, so it no longer matches the SHA-1 package.elm-lang.org recorded. The Lamdera package server serves a copy recovered from https://github.com/maca/postgrest-admin-preview.
What we checked: Rebuilt with git archive from commit 510e4e0643c6 of https://github.com/maca/postgrest-admin-preview (zip prefix maca-postgrest-admin-preview-510e4e0/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 005a3e364fb2447da03444771f3bbdd4ca28736a.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/maca/postgrest-admin-preview/zipball/5.0.0/
Obtain the PostgREST instance url.
Represents a PostgREST table.
Obtain a table from the table name.
Obtain the name of a table
Note that the request functions do not produce a vanilla Elm Cmd but a PostgRestAdmin.Cmd.
Fetches a record for a given table.
expect param requires a function that returns a Msg.
import PostgRestAdmin.Cmd as AppCmd
fetchOne : (Result Error Record -> msg) -> String -> Client -> AppCmd.Cmd Msg
fetchOne tagger tableName client =
case getTable tableName client of
Just table ->
fetchRecord
{ client = client
, table = table
, params = []
, expect = tagger
}
Nothing ->
AppCmd.noneFetches a list of records for a given table.
expect param requires a function that returns a Msg.
import PostgRestAdmin.Cmd as AppCmd
fetchList : (Result Error (List Record) -> Msg) -> String -> Client -> AppCmd.Cmd Msg
fetchList tagger tableName client =
case getTable tableName client of
Just table ->
fetchRecordList
{ client = client
, table = table
, params = []
, expect = tagger
}
Nothing ->
AppCmd.noneSaves a record.
expect param requires a function that returns a Msg.
You can use expectRecord to interpret the result as a Record.
import PostgRestAdmin.Cmd as AppCmd
save : (Result Error () -> Msg) -> Record -> Maybe String -> Client -> AppCmd.Cmd Msg
save tagger record id client =
saveRecord
{ client = client
, record = record
, id = id
, expect = tagger
}Deletes a record.
expect param requires a function that returns a Msg.
import PostgRestAdmin.Cmd as AppCmd
delete : (Result Error Record -> Msg) -> Record -> Client -> AppCmd.Cmd Msg
delete tagger record client =
deleteRecord
{ client = client
, record = record
, expect = tagger
}Perform a request
Expect the response to be JSON and decode.
Request error.
Transform Error to an error explanation.
Does the client has a valid JWT?
Obtain the JWT as a string.
Represents a client for a PostgREST instance, including authentication params.
See Config and Config.FormAuth for authentication configuration options.