mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 12:27:59 +00:00
3cd3a238c2
* fix: all enums same style * fix: rename process to reduce * add some missing enum renaming Co-authored-by: Livio Amstutz <livio.a@gmail.com>
29 lines
978 B
Go
29 lines
978 B
Go
package grpc
|
|
|
|
import "github.com/caos/zitadel/internal/model"
|
|
|
|
func searchMethodToModel(method SearchMethod) model.SearchMethod {
|
|
switch method {
|
|
case SearchMethod_SEARCHMETHOD_EQUALS:
|
|
return model.SearchMethodEquals
|
|
case SearchMethod_SEARCHMETHOD_CONTAINS:
|
|
return model.SearchMethodContains
|
|
case SearchMethod_SEARCHMETHOD_STARTS_WITH:
|
|
return model.SearchMethodStartsWith
|
|
case SearchMethod_SEARCHMETHOD_EQUALS_IGNORE_CASE:
|
|
return model.SearchMethodEqualsIgnoreCase
|
|
case SearchMethod_SEARCHMETHOD_CONTAINS_IGNORE_CASE:
|
|
return model.SearchMethodContainsIgnoreCase
|
|
case SearchMethod_SEARCHMETHOD_STARTS_WITH_IGNORE_CASE:
|
|
return model.SearchMethodStartsWithIgnoreCase
|
|
case SearchMethod_SEARCHMETHOD_NOT_EQUALS:
|
|
return model.SearchMethodNotEquals
|
|
case SearchMethod_SEARCHMETHOD_IS_ONE_OF:
|
|
return model.SearchMethodIsOneOf
|
|
case SearchMethod_SEARCHMETHOD_LIST_CONTAINS:
|
|
return model.SearchMethodListContains
|
|
default:
|
|
return model.SearchMethodEquals
|
|
}
|
|
}
|