mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
55 lines
1.2 KiB
Go
55 lines
1.2 KiB
Go
package model
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
|
|
"time"
|
|
)
|
|
|
|
type OrgProjectMapping struct {
|
|
OrgID string
|
|
ProjectID string
|
|
}
|
|
|
|
type OrgProjectMappingViewSearchRequest struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
SortingColumn OrgProjectMappingViewSearchKey
|
|
Asc bool
|
|
Queries []*OrgProjectMappingViewSearchQuery
|
|
}
|
|
|
|
type OrgProjectMappingViewSearchKey int32
|
|
|
|
const (
|
|
OrgProjectMappingSearchKeyUnspecified OrgProjectMappingViewSearchKey = iota
|
|
OrgProjectMappingSearchKeyProjectID
|
|
OrgProjectMappingSearchKeyOrgID
|
|
OrgProjectMappingSearchKeyProjectGrantID
|
|
OrgProjectMappingSearchKeyInstanceID
|
|
)
|
|
|
|
type OrgProjectMappingViewSearchQuery struct {
|
|
Key OrgProjectMappingViewSearchKey
|
|
Method domain.SearchMethod
|
|
Value interface{}
|
|
}
|
|
|
|
type OrgProjectMappingViewSearchResponse struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
TotalResult uint64
|
|
Result []*OrgProjectMapping
|
|
Sequence uint64
|
|
Timestamp time.Time
|
|
}
|
|
|
|
func (r *OrgProjectMappingViewSearchRequest) GetSearchQuery(key OrgProjectMappingViewSearchKey) (int, *OrgProjectMappingViewSearchQuery) {
|
|
for i, q := range r.Queries {
|
|
if q.Key == key {
|
|
return i, q
|
|
}
|
|
}
|
|
return -1, nil
|
|
}
|