zitadel/internal/eventstore/asset.go
Silvan 5349d96ce4
fix(eventstore): sub queries (#1805)
* sub queries

* fix: tests

* add builder to tests

* new search query

* rename searchquerybuilder to builder

* remove comment from code

* test with multiple queries

* add filters test

* fix(contibute): listing

* add validate module

* fix: search queries

* remove unused event type in query

* ignore query if error in marshal

* go mod tidy

* update privacy policy query

* update queries

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-07-06 13:55:57 +02:00

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,
}
}