Documentation
¶
Index ¶
- func FirestoreValueToJSON(value interface{}) interface{}
- func IsAbsolutePath(path string) bool
- func IsRelativePath(path string) bool
- func JSONToFirestoreValue(value interface{}, client *firestore.Client) (interface{}, error)
- func ValidateCollectionPath(path string) error
- func ValidateDocumentPath(path string) error
- type PathType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirestoreValueToJSON ¶
func FirestoreValueToJSON(value interface{}) interface{}
FirestoreValueToJSON converts a Firestore value to a simplified JSON representation This removes type information and returns plain values
func IsAbsolutePath ¶ added in v0.14.0
IsAbsolutePath checks if a path is an absolute Firestore path
func IsRelativePath ¶ added in v0.14.0
IsRelativePath checks if a path is a relative Firestore path
func JSONToFirestoreValue ¶
JSONToFirestoreValue converts a JSON value with type information to a Firestore-compatible value The input should be a map with a single key indicating the type (e.g., "stringValue", "integerValue") If a client is provided, referenceValue types will be converted to *firestore.DocumentRef
func ValidateCollectionPath ¶ added in v0.14.0
ValidateCollectionPath validates that a path is a valid Firestore collection path. Collection paths must have an odd number of segments (collection/doc/collection)
func ValidateDocumentPath ¶ added in v0.14.0
ValidateDocumentPath validates that a path is a valid Firestore document path. Document paths must have an even number of segments (collection/doc or collection/doc/collection/doc)