mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:57:33 +00:00
feat: actions (#2377)
* feat(actions): begin api * feat(actions): begin api * api and projections * fix: handle multiple statements for a single event in projections * export func type * fix test * update to new reduce interface * flows in login * feat: jwt idp * feat: command side * feat: add tests * actions and flows * fill idp views with jwt idps and return apis * add jwtEndpoint to jwt idp * begin jwt request handling * add feature * merge * merge * handle jwt idp * cleanup * bug fixes * autoregister * get token from specific header name * fix: proto * fixes * i18n * begin tests * fix and log http proxy * remove docker cache * fixes * usergrants in actions api * tests adn cleanup * cleanup * fix add user grant * set login context * i18n Co-authored-by: fabi <fabienne.gerschwiler@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
"github.com/caos/zitadel/internal/query"
|
||||
"github.com/caos/zitadel/pkg/grpc/object"
|
||||
object_pb "github.com/caos/zitadel/pkg/grpc/object"
|
||||
)
|
||||
@@ -105,3 +106,26 @@ func ListQueryToModel(query *object_pb.ListQuery) (offset, limit uint64, asc boo
|
||||
}
|
||||
return query.Offset, uint64(query.Limit), query.Asc
|
||||
}
|
||||
|
||||
func TextMethodToQuery(method object_pb.TextQueryMethod) query.TextComparison {
|
||||
switch method {
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_EQUALS:
|
||||
return query.TextEquals
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE:
|
||||
return query.TextEqualsIgnore
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_STARTS_WITH:
|
||||
return query.TextStartsWith
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE:
|
||||
return query.TextStartsWithIgnore
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_CONTAINS:
|
||||
return query.TextContains
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE:
|
||||
return query.TextContainsIgnore
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_ENDS_WITH:
|
||||
return query.TextEndsWith
|
||||
case object.TextQueryMethod_TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE:
|
||||
return query.TextEndsWithIgnore
|
||||
default:
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user