mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
36 lines
507 B
Go
36 lines
507 B
Go
|
package eventstore
|
||
|
|
||
|
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 (
|
||
|
AssetAdd AssetAction = iota
|
||
|
AssetRemove
|
||
|
)
|
||
|
|
||
|
func NewAddAsset(
|
||
|
id string,
|
||
|
asset []byte) *Asset {
|
||
|
return &Asset{
|
||
|
ID: id,
|
||
|
Asset: asset,
|
||
|
Action: AssetAdd,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func NewRemoveAsset(
|
||
|
id string) *Asset {
|
||
|
return &Asset{
|
||
|
ID: id,
|
||
|
Action: AssetRemove,
|
||
|
}
|
||
|
}
|