Skip to content

Instantly share code, notes, and snippets.

@kutanov
Last active December 27, 2019 14:01
Show Gist options
  • Save kutanov/685d7cb395be287b944bb16b11ccda35 to your computer and use it in GitHub Desktop.
Save kutanov/685d7cb395be287b944bb16b11ccda35 to your computer and use it in GitHub Desktop.
application 'application' has
transport :kafka do
addresses: ['10.10.20.10', '10.10.20.11']
credentials: '123123123'
end
architecture :eventide
collection 'accounts' with
entity 'account' with
id: @id,
name: string,
email: string
end
snapshot "snapshots-account-@id"
action 'ChangeEmail' do
ask email
command 'EmailChanged' do
metatags: {
}
payload: {
email: @email
}
end
success_event 'AccountChanged' do
metaags: {
}
payload: {
}
end
end
action 'Ban' do
command 'AccountBlocked' do
metatags: {
},
payload: {
}
end
success_event 'AccountBlocked' do
end
end
end
end
service 'stripe' do
transport 'stripe_connector'
api_key '231312pkdpowkfpowekfpwekofpk'
collection 'payments'
belongs_to :accounts, key: @id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment