Fabi 12f128e3c5
docs: api request descriptions (#1637)
* doc: api descriptions

* doc: management description

* doc: message validation

* doc: api descriptions

* doc: api descriptions

* doc: description

* doc: index images

* doc: design

* colors, colors and more colors

* margin

* fix comment

* doc: api descriptions

* doc: empty response

* doc: api descriptions

* fix comment

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-04-22 12:59:17 +00:00

38 lines
526 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
assetActionCount
)
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,
}
}