mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
3c07a186fc
* fix: pub sub in new eventstore * fix: todos * fix: todos * fix: todos * fix: todos * fix: todos
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package management
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/domain"
|
|
"github.com/caos/zitadel/pkg/grpc/management"
|
|
)
|
|
|
|
func searchMethodToModel(method management.SearchMethod) domain.SearchMethod {
|
|
switch method {
|
|
case management.SearchMethod_SEARCHMETHOD_EQUALS:
|
|
return domain.SearchMethodEquals
|
|
case management.SearchMethod_SEARCHMETHOD_CONTAINS:
|
|
return domain.SearchMethodContains
|
|
case management.SearchMethod_SEARCHMETHOD_STARTS_WITH:
|
|
return domain.SearchMethodStartsWith
|
|
case management.SearchMethod_SEARCHMETHOD_EQUALS_IGNORE_CASE:
|
|
return domain.SearchMethodEqualsIgnoreCase
|
|
case management.SearchMethod_SEARCHMETHOD_CONTAINS_IGNORE_CASE:
|
|
return domain.SearchMethodContainsIgnoreCase
|
|
case management.SearchMethod_SEARCHMETHOD_STARTS_WITH_IGNORE_CASE:
|
|
return domain.SearchMethodStartsWithIgnoreCase
|
|
case management.SearchMethod_SEARCHMETHOD_NOT_EQUALS:
|
|
return domain.SearchMethodNotEquals
|
|
case management.SearchMethod_SEARCHMETHOD_IS_ONE_OF:
|
|
return domain.SearchMethodIsOneOf
|
|
case management.SearchMethod_SEARCHMETHOD_LIST_CONTAINS:
|
|
return domain.SearchMethodListContains
|
|
default:
|
|
return domain.SearchMethodEquals
|
|
}
|
|
}
|