MCPcopy Create free account
hub / github.com/bytebase/bytebase / maskCosmosDB

Function maskCosmosDB

backend/api/v1/document_masking.go:650–655  ·  view source on GitHub ↗
(span *parserbase.QuerySpan, data map[string]any, objectSchema *storepb.ObjectSchema, semanticTypeToMasker map[string]masker.Masker)

Source from the content-addressed store, hash-verified

648}
649
650func maskCosmosDB(span *parserbase.QuerySpan, data map[string]any, objectSchema *storepb.ObjectSchema, semanticTypeToMasker map[string]masker.Masker) (map[string]any, error) {
651 if len(span.Results) != 1 {
652 return nil, errors.Errorf("expected 1 result, but got %d", len(span.Results))
653 }
654 return walkAndMaskJSON(data, span.Results[0].SourceFieldPaths, objectSchema, semanticTypeToMasker)
655}
656
657// maskCosmosDBScalarValue handles VALUE query results where the JSON is a scalar
658// (string, number, bool) rather than an object. It checks if any projected source

Callers 3

maskCosmosDBDocFunction · 0.85
maskResultsMethod · 0.85

Calls 2

walkAndMaskJSONFunction · 0.85
ErrorfMethod · 0.80

Tested by 2

maskCosmosDBDocFunction · 0.68