mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
feat: add assets to eventstore and event (#1674)
* fix: add assets to eventstore and event * fix: project member, grant member, app changed tests * fix: asset migrations * feat: add asset tests * feat: add asset tests * Update internal/eventstore/repository/repository.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * feat: add asset tests Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
24
internal/eventstore/repository/asset.go
Normal file
24
internal/eventstore/repository/asset.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package repository
|
||||
|
||||
//Asset represents all information about a asset (img)
|
||||
type Asset struct {
|
||||
// ID is to refer to the asset
|
||||
ID string
|
||||
//Asset is the actual image
|
||||
Asset []byte
|
||||
//Action defines if asset should be added or removed
|
||||
Action AssetAction
|
||||
}
|
||||
|
||||
type AssetAction int32
|
||||
|
||||
const (
|
||||
AssetAdded AssetAction = iota
|
||||
AssetRemoved
|
||||
|
||||
assetCount
|
||||
)
|
||||
|
||||
func (f AssetAction) Valid() bool {
|
||||
return f >= 0 && f < assetCount
|
||||
}
|
Reference in New Issue
Block a user