Documentation ¶
Index ¶
- Constants
- func Deserialize(doc *firestorepb.Document, msg protoreflect.ProtoMessage) error
- func DocumentChildren(txn *firestore.Transaction, snap *firestore.DocumentSnapshot) ([]*firestore.DocumentRef, error)
- func GetDatabasePath() string
- func RemoveSerialized(c firestore.Client, txn *firestore.Transaction, collection CollectionName, ...) error
- func Serialize(txn *firestore.Transaction, collection CollectionName, ...) (*firestore.DocumentRef, error)
- func Transform(in interface{}, out interface{}) error
- type CollectionName
- type ProtoIdentifiable
- type ProtoNamed
- type ProtoState
- type ProtoSubscription
Constants ¶
View Source
const ( DataPathRaw = "Raw" DataPathID = "Proto.Id" DataPathName = "Proto.Name" // Firestore collection names // CollectionCustomer - the collection to serialize stripe customer proto messages to CollectionCustomer CollectionName = "customers" // CollectionSubscription - the collection to serialize stripe subscription proto messages to CollectionSubscription CollectionName = "subscriptions" // CollectionWorkspace - the collection to serialize stripe subscription workspace proto messages to CollectionWorkspace CollectionName = "workspaces" // CollectionPlan - the collection to serialize stripe plans proto messages to CollectionPlan CollectionName = "plans" // CollectionProducts - the collection to serialize stripe product proto messages to CollectionProducts CollectionName = "products" )
View Source
const TransformTag = "transform"
TransformTag is a custom struct tag for transforming field paths
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize(doc *firestorepb.Document, msg protoreflect.ProtoMessage) error
func DocumentChildren ¶ added in v0.1.9
func DocumentChildren(txn *firestore.Transaction, snap *firestore.DocumentSnapshot) ([]*firestore.DocumentRef, error)
func GetDatabasePath ¶
func GetDatabasePath() string
func RemoveSerialized ¶
func RemoveSerialized(c firestore.Client, txn *firestore.Transaction, collection CollectionName, state protoreflect.ProtoMessage) error
func Serialize ¶
func Serialize(txn *firestore.Transaction, collection CollectionName, state protoreflect.ProtoMessage, parent *firestore.DocumentRef, children []*firestore.DocumentRef) (*firestore.DocumentRef, error)
Serialize returns the full path of the stored document or an error
Types ¶
type CollectionName ¶
type CollectionName string
type ProtoIdentifiable ¶
type ProtoIdentifiable interface { protoreflect.ProtoMessage GetId() string }
type ProtoNamed ¶
type ProtoNamed interface { protoreflect.ProtoMessage GetName() string }
type ProtoState ¶ added in v0.1.9
type ProtoState struct { Proto interface{} `json:"proto,inline"` Raw interface{} `json:"raw"` Parent *firestore.DocumentRef `json:"parent,omitempty"` Children []*firestore.DocumentRef `json:"children,omitempty"` }
type ProtoSubscription ¶
type ProtoSubscription interface { protoreflect.ProtoMessage GetSubscription() string }
Click to show internal directories.
Click to hide internal directories.