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

Function redactInstance

backend/api/v1/audit.go:656–668  ·  view source on GitHub ↗
(i *v1pb.Instance)

Source from the content-addressed store, hash-verified

654}
655
656func redactInstance(i *v1pb.Instance) *v1pb.Instance {
657 if i == nil {
658 return nil
659 }
660 // Clone the instance to avoid modifying the original response
661 cloned := proto.CloneOf(i)
662 var dataSources []*v1pb.DataSource
663 for _, d := range cloned.DataSources {
664 dataSources = append(dataSources, redactDataSource(d))
665 }
666 cloned.DataSources = dataSources
667 return cloned
668}
669
670func redactDataSource(d *v1pb.DataSource) *v1pb.DataSource {
671 // Clone the datasource to avoid modifying the original

Callers 2

getRequestStringFunction · 0.85
getResponseStringFunction · 0.85

Calls 1

redactDataSourceFunction · 0.85

Tested by

no test coverage detected