state

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

func Transform

func Transform(in interface{}, out interface{}) 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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL