IzumiSy / elm-firestore / 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 -> Json.Encode.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 : Basics.Bool -> Field

bytes : String -> Field

int : Basics.Int -> Field

string : String -> Field

list : (a -> Field) -> List a -> Field

dict : (a -> Field) -> Dict String a -> Field

null : Field

maybe : (a -> Field) -> Maybe a -> Field

timestamp : Time.Posix -> Field

geopoint : Firestore.Types.Geopoint.Geopoint -> Field

reference : Firestore.Types.Reference.Reference -> Field