mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
fix: change to repository event types and removed unused code (#3386)
* fix: change to repository event types and removed unused code * some fixes * remove unused code
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
)
|
||||
|
||||
type CustomTextView struct {
|
||||
AggregateID string
|
||||
Template string
|
||||
Language language.Tag
|
||||
Key string
|
||||
Text string
|
||||
|
||||
CreationDate time.Time
|
||||
ChangeDate time.Time
|
||||
Sequence uint64
|
||||
}
|
||||
|
||||
type CustomTextSearchRequest struct {
|
||||
Offset uint64
|
||||
Limit uint64
|
||||
SortingColumn CustomTextSearchKey
|
||||
Asc bool
|
||||
Queries []*CustomTextSearchQuery
|
||||
}
|
||||
|
||||
type CustomTextSearchKey int32
|
||||
|
||||
const (
|
||||
CustomTextSearchKeyUnspecified CustomTextSearchKey = iota
|
||||
CustomTextSearchKeyAggregateID
|
||||
CustomTextSearchKeyTemplate
|
||||
CustomTextSearchKeyLanguage
|
||||
CustomTextSearchKeyKey
|
||||
)
|
||||
|
||||
type CustomTextSearchQuery struct {
|
||||
Key CustomTextSearchKey
|
||||
Method domain.SearchMethod
|
||||
Value interface{}
|
||||
}
|
||||
|
||||
type CustomTextSearchResponse struct {
|
||||
Offset uint64
|
||||
Limit uint64
|
||||
TotalResult uint64
|
||||
Result []*CustomTextView
|
||||
Sequence uint64
|
||||
Timestamp time.Time
|
||||
}
|
@@ -1,70 +0,0 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
caos_errors "github.com/caos/zitadel/internal/errors"
|
||||
|
||||
"time"
|
||||
)
|
||||
|
||||
type IAMMemberView struct {
|
||||
UserID string
|
||||
IAMID string
|
||||
UserName string
|
||||
Email string
|
||||
FirstName string
|
||||
LastName string
|
||||
DisplayName string
|
||||
PreferredLoginName string
|
||||
AvatarURL string
|
||||
UserResourceOwner string
|
||||
Roles []string
|
||||
CreationDate time.Time
|
||||
ChangeDate time.Time
|
||||
Sequence uint64
|
||||
}
|
||||
|
||||
type IAMMemberSearchRequest struct {
|
||||
Offset uint64
|
||||
Limit uint64
|
||||
SortingColumn IAMMemberSearchKey
|
||||
Asc bool
|
||||
Queries []*IAMMemberSearchQuery
|
||||
}
|
||||
|
||||
type IAMMemberSearchKey int32
|
||||
|
||||
const (
|
||||
IAMMemberSearchKeyUnspecified IAMMemberSearchKey = iota
|
||||
IAMMemberSearchKeyUserName
|
||||
IAMMemberSearchKeyEmail
|
||||
IAMMemberSearchKeyFirstName
|
||||
IAMMemberSearchKeyLastName
|
||||
IAMMemberSearchKeyIamID
|
||||
IAMMemberSearchKeyUserID
|
||||
)
|
||||
|
||||
type IAMMemberSearchQuery struct {
|
||||
Key IAMMemberSearchKey
|
||||
Method domain.SearchMethod
|
||||
Value interface{}
|
||||
}
|
||||
|
||||
type IAMMemberSearchResponse struct {
|
||||
Offset uint64
|
||||
Limit uint64
|
||||
TotalResult uint64
|
||||
Result []*IAMMemberView
|
||||
Sequence uint64
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
||||
func (r *IAMMemberSearchRequest) EnsureLimit(limit uint64) error {
|
||||
if r.Limit > limit {
|
||||
return caos_errors.ThrowInvalidArgument(nil, "SEARCH-vn8ds", "Errors.Limit.ExceedsDefault")
|
||||
}
|
||||
if r.Limit == 0 {
|
||||
r.Limit = limit
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user