mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +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,8 +1,6 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
|
||||
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
|
||||
)
|
||||
|
||||
@@ -16,21 +14,6 @@ type Application struct {
|
||||
OIDCConfig *OIDCConfig
|
||||
APIConfig *APIConfig
|
||||
}
|
||||
type ApplicationChanges struct {
|
||||
Changes []*ApplicationChange
|
||||
LastSequence uint64
|
||||
}
|
||||
|
||||
type ApplicationChange struct {
|
||||
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
|
||||
EventType string `json:"eventType,omitempty"`
|
||||
Sequence uint64 `json:"sequence,omitempty"`
|
||||
ModifierId string `json:"modifierUser,omitempty"`
|
||||
ModifierName string `json:"-"`
|
||||
ModifierLoginName string `json:"-"`
|
||||
ModifierAvatarURL string `json:"-"`
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AppState int32
|
||||
|
||||
@@ -49,10 +32,6 @@ const (
|
||||
AppTypeAPI
|
||||
)
|
||||
|
||||
func NewApplication(projectID, appID string) *Application {
|
||||
return &Application{ObjectRoot: es_models.ObjectRoot{AggregateID: projectID}, AppID: appID, State: AppStateActive}
|
||||
}
|
||||
|
||||
func (a *Application) IsValid(includeConfig bool) bool {
|
||||
if a.Name == "" || a.AggregateID == "" {
|
||||
return false
|
||||
@@ -68,15 +47,3 @@ func (a *Application) IsValid(includeConfig bool) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (a *Application) GetKey(keyID string) (int, *ClientKey) {
|
||||
if a.OIDCConfig == nil {
|
||||
return -1, nil
|
||||
}
|
||||
for i, k := range a.OIDCConfig.ClientKeys {
|
||||
if k.KeyID == keyID {
|
||||
return i, k
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user