feat: support more factors in filter

This commit is contained in:
johnnyjoy
2025-02-02 16:12:44 +08:00
parent 2a392b8f8d
commit b9a0c56163
6 changed files with 100 additions and 17 deletions

View File

@@ -9,7 +9,12 @@ import (
// MemoFilterCELAttributes are the CEL attributes for memo.
var MemoFilterCELAttributes = []cel.EnvOption{
cel.Variable("content", cel.StringType),
// As the built-in timestamp type is deprecated, we use string type for now.
// e.g., "2021-01-01T00:00:00Z"
cel.Variable("create_time", cel.StringType),
cel.Variable("tag", cel.StringType),
cel.Variable("update_time", cel.StringType),
cel.Variable("visibility", cel.StringType),
}
// Parse parses the filter string and returns the parsed expression.