MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / pbJSONFilterToPkg

Function pbJSONFilterToPkg

app/controlplane/internal/service/workflow.go:357–363  ·  view source on GitHub ↗

pbJSONFilterToPkg converts a v1.JSONFilter to a jsonfilter.JSONFilter.

(filter *v1.JSONFilter)

Source from the content-addressed store, hash-verified

355
356// pbJSONFilterToPkg converts a v1.JSONFilter to a jsonfilter.JSONFilter.
357func pbJSONFilterToPkg(filter *v1.JSONFilter) *jsonfilter.JSONFilter {
358 return &jsonfilter.JSONFilter{
359 FieldPath: filter.GetFieldPath(),
360 Value: filter.GetValue(),
361 Operator: pbJSONFilterOperatorToPkg(filter.GetOperator()),
362 }
363}
364
365// pbJSONFilterOperatorToPkg converts a v1.JSONOperator to a jsonfilter.JSONOperator.
366func pbJSONFilterOperatorToPkg(operator v1.JSONOperator) jsonfilter.JSONOperator {

Callers 1

ListMethod · 0.85

Calls 4

GetFieldPathMethod · 0.80
GetOperatorMethod · 0.80
GetValueMethod · 0.45

Tested by

no test coverage detected