zitadel/pkg/management/api/grpc/search_converter.go
Fabi 710652ef24
feat: delete (#243)
* feat: project role remove

* feat: search queries

* feat: search queries

* feat: cascade remove/change project role

* fix: comment in project grant

* fix: remove projecr grant

* fix: only search usergrants of my org

* fix: delete usergrants

* fix: delete usergrants

* fix: check if role exists on project grant

* feat: bulk add project role

* fix: tests

* fix: update user grants on project update

* fix: return roles

* feat: add resourceowner name on project grants

* fix: migration number

* fix: tests

* fix: generate protos

* fix: some unnecessary code
2020-06-19 15:32:03 +02:00

29 lines
1000 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.SEARCHMETHOD_EQUALS
case SearchMethod_SEARCHMETHOD_CONTAINS:
return model.SEARCHMETHOD_CONTAINS
case SearchMethod_SEARCHMETHOD_STARTS_WITH:
return model.SEARCHMETHOD_STARTS_WITH
case SearchMethod_SEARCHMETHOD_EQUALS_IGNORE_CASE:
return model.SEARCHMETHOD_EQUALS_IGNORE_CASE
case SearchMethod_SEARCHMETHOD_CONTAINS_IGNORE_CASE:
return model.SEARCHMETHOD_CONTAINS_IGNORE_CASE
case SearchMethod_SEARCHMETHOD_STARTS_WITH_IGNORE_CASE:
return model.SEARCHMETHOD_STARTS_WITH_IGNORE_CASE
case SearchMethod_SEARCHMETHOD_NOT_EQUALS:
return model.SEARCHMETHOD_NOT_EQUALS
case SearchMethod_SEARCHMETHOD_IS_ONE_OF:
return model.SEARCHMETHOD_IS_ONE_OF
case SearchMethod_SEARCHMETHOD_LIST_CONTAINS:
return model.SEARCHMETHOD_LIST_CONTAINS
default:
return model.SEARCHMETHOD_EQUALS
}
}