zitadel/internal/org/model/domain_view.go
Fabi 423b86a03b
feat: sequence and timestamp on searchrequests (#468)
* feat: reread events

* feat: sequence and timestamo on search requests

* feat: sequence and timestamo on search requests

* fix: better naming

* fix: log errors

* fix: read sequence before search request
2020-07-15 13:24:36 +02:00

55 lines
1.0 KiB
Go

package model
import (
"github.com/caos/zitadel/internal/model"
"time"
)
type OrgDomainView struct {
OrgID string
CreationDate time.Time
ChangeDate time.Time
Domain string
Primary bool
Verified bool
}
type OrgDomainSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn OrgDomainSearchKey
Asc bool
Queries []*OrgDomainSearchQuery
}
type OrgDomainSearchKey int32
const (
OrgDomainSearchKeyUnspecified OrgDomainSearchKey = iota
OrgDomainSearchKeyDomain
OrgDomainSearchKeyOrgID
OrgDomainSearchKeyVerified
OrgDomainSearchKeyPrimary
)
type OrgDomainSearchQuery struct {
Key OrgDomainSearchKey
Method model.SearchMethod
Value interface{}
}
type OrgDomainSearchResponse struct {
Offset uint64
Limit uint64
TotalResult uint64
Result []*OrgDomainView
Sequence uint64
Timestamp time.Time
}
func (r *OrgDomainSearchRequest) EnsureLimit(limit uint64) {
if r.Limit == 0 || r.Limit > limit {
r.Limit = limit
}
}