Documentation
¶
Index ¶
Constants ¶
View Source
const ( GET_DOCUMENT_ERROR = "error getting document from Firestore:" WRITE_BATCH_ERROR = "error writing batch to Firestore:" 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 (*Client) ProcessAccessRequest ¶
func (*Client) ProcessDeletionRequest ¶
func (pal *Client) ProcessDeletionRequest(dataSubjectLocator Locator, dataSubjectID string) (DeletionResult, error)
type DataNode ¶
type DataNode interface { HandleAccess(dataSubjectId string, currentDocumentID string) map[string]interface{} // Only one of deleteNode and fieldsToUpdate should be set. // If deleteNode is set, fieldsToUpdate will be ignored (node will be deleted). HandleDeletion(dataSubjectId string) (nodesToTraverse []Locator, deleteNode bool, fieldsToUpdate []firestore.Update) }
type DeletionResult ¶
type Locator ¶
type Locator struct { Type LocatorType // 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 queries to be applied to a collection. Ignored if type is document. Queries []Query // An empty struct that will be populated with the data from Firestore NewDataNode func() DataNode }
type LocatorType ¶
type LocatorType string
const ( Document LocatorType = "document" Collection LocatorType = "collection" )
Click to show internal directories.
Click to hide internal directories.