Documentation ¶
Index ¶
Constants ¶
View Source
const ( GET_DOCUMENT_ERROR = "error getting document from data store:" WRITE_BATCH_ERROR = "error writing batch to data store:" ACCESS_REQUEST_ERROR = "error processing access request:" DELETION_REQUEST_ERROR = "error processing deletion request:" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithFirestore ¶
func NewClientWithMongo ¶
func (*Client) ProcessAccessRequest ¶
func (*Client) ProcessDeletionRequest ¶
type DatabaseObject ¶
type DatabaseObject map[string]interface{}
type FieldUpdates ¶ added in v1.0.0
type FirestoreLocator ¶
type FirestoreLocator struct { // Collection path leading up to the document in Firestore // E.g. "[users]", "[courses,sections]" CollectionPath []string // List of document IDs in the order of collections DocIDs []string // List of filters to be applied to a collection. Ignored if type is document. Filters []Filter }
type HandleAccessFunc ¶
type HandleAccessFunc func(dataSubjectId string, currentDbObjLocator Locator, dbObj DatabaseObject) (data map[string]interface{}, err error)
type HandleDeletionFunc ¶
type HandleDeletionFunc func(dataSubjectId string, currentDbObjLocator Locator, dbObj DatabaseObject) (nodesToTraverse []Locator, deleteNode bool, fieldsToUpdate FieldUpdates, err error)
Only one of deleteNode and fieldsToUpdate should be set. If deleteNode is set, fieldsToUpdate will be ignored (node will be deleted).
type Locator ¶
type Locator struct { LocatorType LocatorType DataType string // Only one of FirestoreLocator and MongoLocator should be set FirestoreLocator MongoLocator }
type LocatorType ¶
type LocatorType string
const ( Document LocatorType = "document" Collection LocatorType = "collection" )
type MongoLocator ¶
Click to show internal directories.
Click to hide internal directories.