Code Monkey home page Code Monkey logo

go.cqrs's Issues

[Question]aggregate.OriginalVersion vs ExpectedVersion

Hi, I'm curious in which cases the expected version doesn't equal aggregate.OriginalVersion().

return h.repo.Save(item, ycq.Int(item.OriginalVersion()))

return r.repo.Save(aggregate, expectedVersion)

err := streamWriter.Append(expectedVersion, evs...)

https://github.com/jetbasrawi/go.geteventstore/blob/359416153188c8c42a27cd9a6e61e1c72ee6f3b8/streamwriter.go#L42

unfortunately, I can't imagine those cases.
Thanks in advance

Getting started

Hi,

I've just pulled master and get the following issues.

repository_test.go:17:2: cannot find package "github.com/jetbasrawi/go.geteventstore.testfeed

Is there a file missing?

In addition, I'm getting a complaint from the interface

# github.com/jetbasrawi/go.cqrs/examples/simplecqrs/simplecqrs

examples/simplecqrs/simplecqrs/inventoryitem.go:33:29: not enough arguments in call to ycq.NewEventMessage

	have (string, *InventoryItemCreated)

	want (string, interface {}, *int)

Thanks

Paul

[Question] Why pass the reference to the memory address here?

๐Ÿ‘‹ I am in the process of learning Go and this package is really useful resource to try to implement a solution with CQRS pattern. So, first of all, thanks for putting this out there ๐Ÿ™

This is more of a question than an issue. So, apologies in advance and it may be my lack of understanding on the language as well.

Here:

func NewInMemoryRepo(eventBus ycq.EventBus) *InMemoryRepo {
return &InMemoryRepo{

What is the specific reason to pass the memory address to the struct here (if I am understanding the usage of * and & correctly in this context) instead of actually pass it directly (i.e. make the return type InMemoryRepo instead of *InMemoryRepo)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.