mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
48 lines
1.1 KiB
Go
48 lines
1.1 KiB
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/zitadel/internal/model"
|
||
|
)
|
||
|
|
||
|
type SecondFactorsSearchRequest struct {
|
||
|
Queries []*MFASearchQuery
|
||
|
}
|
||
|
|
||
|
type MultiFactorsSearchRequest struct {
|
||
|
Offset uint64
|
||
|
Limit uint64
|
||
|
Asc bool
|
||
|
Queries []*MFASearchQuery
|
||
|
}
|
||
|
|
||
|
type MFASearchQuery struct {
|
||
|
Key MFASearchKey
|
||
|
Method model.SearchMethod
|
||
|
Value interface{}
|
||
|
}
|
||
|
|
||
|
type MFASearchKey int32
|
||
|
|
||
|
const (
|
||
|
MFASearchKeyUnspecified MFASearchKey = iota
|
||
|
MFASearchKeyAggregateID
|
||
|
)
|
||
|
|
||
|
type SecondFactorsSearchResponse struct {
|
||
|
TotalResult uint64
|
||
|
Result []SecondFactorType
|
||
|
}
|
||
|
|
||
|
type MultiFactorsSearchResponse struct {
|
||
|
TotalResult uint64
|
||
|
Result []MultiFactorType
|
||
|
}
|
||
|
|
||
|
func (r *SecondFactorsSearchRequest) AppendAggregateIDQuery(aggregateID string) {
|
||
|
r.Queries = append(r.Queries, &MFASearchQuery{Key: MFASearchKeyAggregateID, Method: model.SearchMethodEquals, Value: aggregateID})
|
||
|
}
|
||
|
|
||
|
func (r *MultiFactorsSearchRequest) AppendAggregateIDQuery(aggregateID string) {
|
||
|
r.Queries = append(r.Queries, &MFASearchQuery{Key: MFASearchKeyAggregateID, Method: model.SearchMethodEquals, Value: aggregateID})
|
||
|
}
|