Documentation
¶
Index ¶
- Constants
- func Deserialize(doc *firestorepb.Document, msg protoreflect.ProtoMessage) error
- func GetDatabasePath() string
- func RemoveSerialized(c firestore.Client, txn *firestore.Transaction, collection CollectionName, ...) error
- func Serialize(txn *firestore.Transaction, collection CollectionName, ...) error
- func Transform(in interface{}, out interface{}) error
- type CollectionName
- type ProtoIdentifiable
- type ProtoNamed
- type ProtoSubscription
- type RawWrapper
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 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) 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 ProtoSubscription ¶
type ProtoSubscription interface { protoreflect.ProtoMessage GetSubscription() string }
type RawWrapper ¶
type RawWrapper struct { Proto interface{} `json:"proto,inline"` Raw interface{} `json:"raw"` }
Click to show internal directories.
Click to hide internal directories.