mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-24 08:59:18 +00:00
feat: handle instanceID in projections (#3442)
* feat: handle instanceID in projections * rename functions * fix key lock * fix import
This commit is contained in:
@@ -50,7 +50,7 @@ type IDPConfigView struct {
|
||||
JWTHeaderName string `json:"headerName" gorm:"jwt_header_name"`
|
||||
|
||||
Sequence uint64 `json:"-" gorm:"column:sequence"`
|
||||
InstanceID string `json:"instanceID" gorm:"column:instance_id"`
|
||||
InstanceID string `json:"instanceID" gorm:"column:instance_id;primary_key"`
|
||||
}
|
||||
|
||||
func IDPConfigViewToModel(idp *IDPConfigView) *model.IDPConfigView {
|
||||
|
||||
@@ -18,6 +18,7 @@ const (
|
||||
IDPProviderKeyAggregateID = "aggregate_id"
|
||||
IDPProviderKeyIdpConfigID = "idp_config_id"
|
||||
IDPProviderKeyState = "idp_state"
|
||||
IDPProviderKeyInstanceID = "instance_id"
|
||||
)
|
||||
|
||||
type IDPProviderView struct {
|
||||
@@ -34,7 +35,7 @@ type IDPProviderView struct {
|
||||
IDPState int32 `json:"-" gorm:"column:idp_state"`
|
||||
|
||||
Sequence uint64 `json:"-" gorm:"column:sequence"`
|
||||
InstanceID string `json:"instanceID" gorm:"column:instance_id"`
|
||||
InstanceID string `json:"instanceID" gorm:"column:instance_id;primary_key"`
|
||||
}
|
||||
|
||||
func IDPProviderViewToModel(provider *IDPProviderView) *model.IDPProviderView {
|
||||
|
||||
@@ -57,6 +57,8 @@ func (key IDPProviderSearchKey) ToColumnName() string {
|
||||
return IDPProviderKeyIdpConfigID
|
||||
case iam_model.IDPProviderSearchKeyState:
|
||||
return IDPProviderKeyState
|
||||
case iam_model.IDPProviderSearchKeyInstanceID:
|
||||
return IDPProviderKeyInstanceID
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ type LabelPolicyView struct {
|
||||
Default bool `json:"-" gorm:"-"`
|
||||
|
||||
Sequence uint64 `json:"-" gorm:"column:sequence"`
|
||||
InstanceID string `json:"instanceID" gorm:"column:instance_id"`
|
||||
InstanceID string `json:"instanceID" gorm:"column:instance_id;primary_key"`
|
||||
}
|
||||
|
||||
type AssetView struct {
|
||||
|
||||
Reference in New Issue
Block a user