IzumiSy/elm-firestore/10.0.0

NOTE: the latest version is 13.0.0

Firestore.Encode

Encoders for Firestore

type Encoder

An encoder consisted of Firestore specific encoders.

This can be encoded into Json.Value through encode function.

encode : Encoder -> Value

Generates Json.Encode.Value from Encoder

type Field

An field identifier type for Firestore encoder

Constructors

document : List ( String, Field ) -> Encoder

Creates a new encoder

This function works like Encode.object but accepts a list of tuples which has only encoders provided from Firestore.Encode module

Firestore.Encode.document
    [ ( "name", Firestore.Encode.string "IzumiSy" )
    , ( "age", Firestore.Encode.int 26 )
    , ( "canCode", Firestore.Encode.bool True )
    ]

Types

bool : Bool -> Field
bytes : String -> Field
int : Int -> Field
string : String -> Field
list : (a -> Field) -> List a -> Field
dict : (a -> Field) -> Dict String a -> Field
maybe : (a -> Field) -> Maybe a -> Field
timestamp : Posix -> Field