mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:37:34 +00:00
chore: move the go code into a subfolder
This commit is contained in:
35
apps/api/internal/eventstore/asset.go
Normal file
35
apps/api/internal/eventstore/asset.go
Normal file
@@ -0,0 +1,35 @@
|
||||
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,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user