diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 999f025..9f9db6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} - - uses: earthly/actions/setup-earthly@v1 + - uses: earthly/actions/setup-earthly@v2 with: version: v0.7.19 - name: Earthly version @@ -52,7 +52,7 @@ jobs: files: ./coverage.out # optional fail_ci_if_error: false # optional (default = false) verbose: false # optional (default = false) -# - uses: go-semantic-release/action@v1 +# - uses: go-semantic-release/action@v2 # id: semver # with: # github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6af3a5c..9fb8c17 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN}} - - uses: earthly/actions/setup-earthly@v1 + - uses: earthly/actions/setup-earthly@v2 with: version: v0.7.19 - name: Earthly version diff --git a/Earthfile b/Earthfile index f0c500d..ab43f6a 100644 --- a/Earthfile +++ b/Earthfile @@ -13,7 +13,7 @@ protogen: --path protos/ego # save artifact to - SAVE ARTIFACT gen/ego/v1 AS LOCAL egopb + SAVE ARTIFACT gen/ego/v2 AS LOCAL egopb testprotogen: # copy the proto files to generate diff --git a/actor.go b/actor.go index 6889259..d823917 100644 --- a/actor.go +++ b/actor.go @@ -39,10 +39,10 @@ import ( "github.com/tochemey/goakt/v2/actors" "github.com/tochemey/goakt/v2/goaktpb" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore" - "github.com/tochemey/ego/eventstream" - "github.com/tochemey/ego/internal/telemetry" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore" + "github.com/tochemey/ego/v2/eventstream" + "github.com/tochemey/ego/v2/internal/telemetry" ) var ( diff --git a/actor_test.go b/actor_test.go index d035b1b..ec41302 100644 --- a/actor_test.go +++ b/actor_test.go @@ -39,11 +39,11 @@ import ( "github.com/tochemey/goakt/v2/log" "github.com/tochemey/gopack/postgres" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore/memory" - pgeventstore "github.com/tochemey/ego/eventstore/postgres" - "github.com/tochemey/ego/eventstream" - testpb "github.com/tochemey/ego/test/data/pb/v1" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore/memory" + pgeventstore "github.com/tochemey/ego/v2/eventstore/postgres" + "github.com/tochemey/ego/v2/eventstream" + testpb "github.com/tochemey/ego/v2/test/data/pb/v1" ) func TestActor(t *testing.T) { diff --git a/egopb/ego.pb.go b/egopb/ego.pb.go index 5083dc1..986acb7 100644 --- a/egopb/ego.pb.go +++ b/egopb/ego.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.31.0 // protoc (unknown) -// source: ego/v1/ego.proto +// source: ego/v2/ego.proto package egopb @@ -46,7 +46,7 @@ type Event struct { func (x *Event) Reset() { *x = Event{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[0] + mi := &file_ego_v2_ego_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -59,7 +59,7 @@ func (x *Event) String() string { func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[0] + mi := &file_ego_v2_ego_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72,7 +72,7 @@ func (x *Event) ProtoReflect() protoreflect.Message { // Deprecated: Use Event.ProtoReflect.Descriptor instead. func (*Event) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{0} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{0} } func (x *Event) GetPersistenceId() string { @@ -143,7 +143,7 @@ type CommandReply struct { func (x *CommandReply) Reset() { *x = CommandReply{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[1] + mi := &file_ego_v2_ego_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -156,7 +156,7 @@ func (x *CommandReply) String() string { func (*CommandReply) ProtoMessage() {} func (x *CommandReply) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[1] + mi := &file_ego_v2_ego_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -169,7 +169,7 @@ func (x *CommandReply) ProtoReflect() protoreflect.Message { // Deprecated: Use CommandReply.ProtoReflect.Descriptor instead. func (*CommandReply) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{1} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{1} } func (m *CommandReply) GetReply() isCommandReply_Reply { @@ -231,7 +231,7 @@ type StateReply struct { func (x *StateReply) Reset() { *x = StateReply{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[2] + mi := &file_ego_v2_ego_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -244,7 +244,7 @@ func (x *StateReply) String() string { func (*StateReply) ProtoMessage() {} func (x *StateReply) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[2] + mi := &file_ego_v2_ego_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -257,7 +257,7 @@ func (x *StateReply) ProtoReflect() protoreflect.Message { // Deprecated: Use StateReply.ProtoReflect.Descriptor instead. func (*StateReply) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{2} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{2} } func (x *StateReply) GetPersistenceId() string { @@ -302,7 +302,7 @@ type ErrorReply struct { func (x *ErrorReply) Reset() { *x = ErrorReply{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[3] + mi := &file_ego_v2_ego_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -315,7 +315,7 @@ func (x *ErrorReply) String() string { func (*ErrorReply) ProtoMessage() {} func (x *ErrorReply) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[3] + mi := &file_ego_v2_ego_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -328,7 +328,7 @@ func (x *ErrorReply) ProtoReflect() protoreflect.Message { // Deprecated: Use ErrorReply.ProtoReflect.Descriptor instead. func (*ErrorReply) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{3} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{3} } func (x *ErrorReply) GetMessage() string { @@ -348,7 +348,7 @@ type NoReply struct { func (x *NoReply) Reset() { *x = NoReply{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[4] + mi := &file_ego_v2_ego_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -361,7 +361,7 @@ func (x *NoReply) String() string { func (*NoReply) ProtoMessage() {} func (x *NoReply) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[4] + mi := &file_ego_v2_ego_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -374,7 +374,7 @@ func (x *NoReply) ProtoReflect() protoreflect.Message { // Deprecated: Use NoReply.ProtoReflect.Descriptor instead. func (*NoReply) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{4} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{4} } // GetStateCommand tells the Aggregate @@ -388,7 +388,7 @@ type GetStateCommand struct { func (x *GetStateCommand) Reset() { *x = GetStateCommand{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[5] + mi := &file_ego_v2_ego_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -401,7 +401,7 @@ func (x *GetStateCommand) String() string { func (*GetStateCommand) ProtoMessage() {} func (x *GetStateCommand) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[5] + mi := &file_ego_v2_ego_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -414,7 +414,7 @@ func (x *GetStateCommand) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateCommand.ProtoReflect.Descriptor instead. func (*GetStateCommand) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{5} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{5} } // Offset defines the projection offset @@ -436,7 +436,7 @@ type Offset struct { func (x *Offset) Reset() { *x = Offset{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[6] + mi := &file_ego_v2_ego_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -449,7 +449,7 @@ func (x *Offset) String() string { func (*Offset) ProtoMessage() {} func (x *Offset) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[6] + mi := &file_ego_v2_ego_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -462,7 +462,7 @@ func (x *Offset) ProtoReflect() protoreflect.Message { // Deprecated: Use Offset.ProtoReflect.Descriptor instead. func (*Offset) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{6} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{6} } func (x *Offset) GetShardNumber() uint64 { @@ -508,7 +508,7 @@ type ProjectionId struct { func (x *ProjectionId) Reset() { *x = ProjectionId{} if protoimpl.UnsafeEnabled { - mi := &file_ego_v1_ego_proto_msgTypes[7] + mi := &file_ego_v2_ego_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -521,7 +521,7 @@ func (x *ProjectionId) String() string { func (*ProjectionId) ProtoMessage() {} func (x *ProjectionId) ProtoReflect() protoreflect.Message { - mi := &file_ego_v1_ego_proto_msgTypes[7] + mi := &file_ego_v2_ego_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -534,7 +534,7 @@ func (x *ProjectionId) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectionId.ProtoReflect.Descriptor instead. func (*ProjectionId) Descriptor() ([]byte, []int) { - return file_ego_v1_ego_proto_rawDescGZIP(), []int{7} + return file_ego_v2_ego_proto_rawDescGZIP(), []int{7} } func (x *ProjectionId) GetProjectionName() string { @@ -551,10 +551,10 @@ func (x *ProjectionId) GetShardNumber() uint64 { return 0 } -var File_ego_v1_ego_proto protoreflect.FileDescriptor +var File_ego_v2_ego_proto protoreflect.FileDescriptor -var file_ego_v1_ego_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x65, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, +var file_ego_v2_ego_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x65, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x67, 0x6f, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, @@ -616,7 +616,7 @@ var file_ego_v1_ego_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x2e, 0x65, 0x67, 0x6f, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x45, 0x67, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x48, 0x02, 0x50, 0x01, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x6f, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x79, 0x2f, 0x65, 0x67, 0x6f, - 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x67, 0x6f, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, + 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x67, 0x6f, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x45, 0x67, 0x6f, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x45, 0x67, 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x45, 0x67, 0x6f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x45, 0x67, 0x6f, 0x3a, 0x3a, 0x56, 0x31, @@ -624,19 +624,19 @@ var file_ego_v1_ego_proto_rawDesc = []byte{ } var ( - file_ego_v1_ego_proto_rawDescOnce sync.Once - file_ego_v1_ego_proto_rawDescData = file_ego_v1_ego_proto_rawDesc + file_ego_v2_ego_proto_rawDescOnce sync.Once + file_ego_v2_ego_proto_rawDescData = file_ego_v2_ego_proto_rawDesc ) -func file_ego_v1_ego_proto_rawDescGZIP() []byte { - file_ego_v1_ego_proto_rawDescOnce.Do(func() { - file_ego_v1_ego_proto_rawDescData = protoimpl.X.CompressGZIP(file_ego_v1_ego_proto_rawDescData) +func file_ego_v2_ego_proto_rawDescGZIP() []byte { + file_ego_v2_ego_proto_rawDescOnce.Do(func() { + file_ego_v2_ego_proto_rawDescData = protoimpl.X.CompressGZIP(file_ego_v2_ego_proto_rawDescData) }) - return file_ego_v1_ego_proto_rawDescData + return file_ego_v2_ego_proto_rawDescData } -var file_ego_v1_ego_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_ego_v1_ego_proto_goTypes = []interface{}{ +var file_ego_v2_ego_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_ego_v2_ego_proto_goTypes = []interface{}{ (*Event)(nil), // 0: ego.v1.Event (*CommandReply)(nil), // 1: ego.v1.CommandReply (*StateReply)(nil), // 2: ego.v1.StateReply @@ -647,7 +647,7 @@ var file_ego_v1_ego_proto_goTypes = []interface{}{ (*ProjectionId)(nil), // 7: ego.v1.ProjectionId (*anypb.Any)(nil), // 8: google.protobuf.Any } -var file_ego_v1_ego_proto_depIdxs = []int32{ +var file_ego_v2_ego_proto_depIdxs = []int32{ 8, // 0: ego.v1.Event.event:type_name -> google.protobuf.Any 8, // 1: ego.v1.Event.resulting_state:type_name -> google.protobuf.Any 2, // 2: ego.v1.CommandReply.state_reply:type_name -> ego.v1.StateReply @@ -660,13 +660,13 @@ var file_ego_v1_ego_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_ego_v1_ego_proto_init() } -func file_ego_v1_ego_proto_init() { - if File_ego_v1_ego_proto != nil { +func init() { file_ego_v2_ego_proto_init() } +func file_ego_v2_ego_proto_init() { + if File_ego_v2_ego_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ego_v1_ego_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Event); i { case 0: return &v.state @@ -678,7 +678,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommandReply); i { case 0: return &v.state @@ -690,7 +690,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateReply); i { case 0: return &v.state @@ -702,7 +702,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ErrorReply); i { case 0: return &v.state @@ -714,7 +714,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NoReply); i { case 0: return &v.state @@ -726,7 +726,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStateCommand); i { case 0: return &v.state @@ -738,7 +738,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Offset); i { case 0: return &v.state @@ -750,7 +750,7 @@ func file_ego_v1_ego_proto_init() { return nil } } - file_ego_v1_ego_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ego_v2_ego_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProjectionId); i { case 0: return &v.state @@ -763,7 +763,7 @@ func file_ego_v1_ego_proto_init() { } } } - file_ego_v1_ego_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_ego_v2_ego_proto_msgTypes[1].OneofWrappers = []interface{}{ (*CommandReply_StateReply)(nil), (*CommandReply_ErrorReply)(nil), } @@ -771,18 +771,18 @@ func file_ego_v1_ego_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ego_v1_ego_proto_rawDesc, + RawDescriptor: file_ego_v2_ego_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ego_v1_ego_proto_goTypes, - DependencyIndexes: file_ego_v1_ego_proto_depIdxs, - MessageInfos: file_ego_v1_ego_proto_msgTypes, + GoTypes: file_ego_v2_ego_proto_goTypes, + DependencyIndexes: file_ego_v2_ego_proto_depIdxs, + MessageInfos: file_ego_v2_ego_proto_msgTypes, }.Build() - File_ego_v1_ego_proto = out.File - file_ego_v1_ego_proto_rawDesc = nil - file_ego_v1_ego_proto_goTypes = nil - file_ego_v1_ego_proto_depIdxs = nil + File_ego_v2_ego_proto = out.File + file_ego_v2_ego_proto_rawDesc = nil + file_ego_v2_ego_proto_goTypes = nil + file_ego_v2_ego_proto_depIdxs = nil } diff --git a/engine.go b/engine.go index 7820eab..61625da 100644 --- a/engine.go +++ b/engine.go @@ -38,11 +38,11 @@ import ( "github.com/tochemey/goakt/v2/log" "github.com/tochemey/goakt/v2/telemetry" - "github.com/tochemey/ego/eventstore" - "github.com/tochemey/ego/eventstream" - egotel "github.com/tochemey/ego/internal/telemetry" - "github.com/tochemey/ego/offsetstore" - "github.com/tochemey/ego/projection" + "github.com/tochemey/ego/v2/eventstore" + "github.com/tochemey/ego/v2/eventstream" + egotel "github.com/tochemey/ego/v2/internal/telemetry" + "github.com/tochemey/ego/v2/offsetstore" + "github.com/tochemey/ego/v2/projection" ) // Engine represents the engine that empowers the various entities diff --git a/engine_test.go b/engine_test.go index 6870155..81eee67 100644 --- a/engine_test.go +++ b/engine_test.go @@ -41,11 +41,11 @@ import ( "github.com/tochemey/goakt/v2/log" mockdisco "github.com/tochemey/goakt/v2/mocks/discovery" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore/memory" - samplepb "github.com/tochemey/ego/example/pbs/sample/pb/v1" - offsetstore "github.com/tochemey/ego/offsetstore/memory" - "github.com/tochemey/ego/projection" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore/memory" + samplepb "github.com/tochemey/ego/v2/example/pbs/sample/pb/v1" + offsetstore "github.com/tochemey/ego/v2/offsetstore/memory" + "github.com/tochemey/ego/v2/projection" ) func TestEgo(t *testing.T) { diff --git a/entity.go b/entity.go index fc40079..5e346db 100644 --- a/entity.go +++ b/entity.go @@ -33,7 +33,7 @@ import ( "github.com/tochemey/goakt/v2/actors" - "github.com/tochemey/ego/egopb" + "github.com/tochemey/ego/v2/egopb" ) var ( diff --git a/entity_test.go b/entity_test.go index 0ab4132..96a3cf2 100644 --- a/entity_test.go +++ b/entity_test.go @@ -32,8 +32,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tochemey/ego/eventstore/memory" - samplepb "github.com/tochemey/ego/example/pbs/sample/pb/v1" + "github.com/tochemey/ego/v2/eventstore/memory" + samplepb "github.com/tochemey/ego/v2/example/pbs/sample/pb/v1" ) func TestNewEntity(t *testing.T) { diff --git a/eventstore/iface.go b/eventstore/iface.go index 6aa8e56..d42cd92 100644 --- a/eventstore/iface.go +++ b/eventstore/iface.go @@ -27,7 +27,7 @@ package eventstore import ( "context" - "github.com/tochemey/ego/egopb" + "github.com/tochemey/ego/v2/egopb" ) // EventsStore defines the API to write to the events store diff --git a/eventstore/memory/memory.go b/eventstore/memory/memory.go index 17ae012..d42e14c 100644 --- a/eventstore/memory/memory.go +++ b/eventstore/memory/memory.go @@ -39,9 +39,9 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/known/anypb" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore" - "github.com/tochemey/ego/internal/telemetry" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore" + "github.com/tochemey/ego/v2/internal/telemetry" ) // EventsStore keep in memory every journal diff --git a/eventstore/memory/memory_test.go b/eventstore/memory/memory_test.go index 338cabd..593902d 100644 --- a/eventstore/memory/memory_test.go +++ b/eventstore/memory/memory_test.go @@ -35,9 +35,9 @@ import ( "google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore" - testpb "github.com/tochemey/ego/test/data/pb/v1" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore" + testpb "github.com/tochemey/ego/v2/test/data/pb/v1" ) func TestEventsStore(t *testing.T) { diff --git a/eventstore/postgres/postgres.go b/eventstore/postgres/postgres.go index eac26aa..b0127eb 100644 --- a/eventstore/postgres/postgres.go +++ b/eventstore/postgres/postgres.go @@ -35,9 +35,9 @@ import ( "github.com/tochemey/gopack/postgres" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore" - "github.com/tochemey/ego/internal/telemetry" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore" + "github.com/tochemey/ego/v2/internal/telemetry" ) var ( diff --git a/eventstore/postgres/postgres_test.go b/eventstore/postgres/postgres_test.go index 4f75805..3bb729c 100644 --- a/eventstore/postgres/postgres_test.go +++ b/eventstore/postgres/postgres_test.go @@ -37,9 +37,9 @@ import ( "github.com/tochemey/gopack/postgres" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore" - testpb "github.com/tochemey/ego/test/data/pb/v1" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore" + testpb "github.com/tochemey/ego/v2/test/data/pb/v1" ) func TestPostgresEventsStore(t *testing.T) { diff --git a/eventstore/postgres/row.go b/eventstore/postgres/row.go index 4d8a98c..698f4dd 100644 --- a/eventstore/postgres/row.go +++ b/eventstore/postgres/row.go @@ -33,7 +33,7 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/known/anypb" - "github.com/tochemey/ego/egopb" + "github.com/tochemey/ego/v2/egopb" ) // row represents the events store row diff --git a/eventstream/subscriber.go b/eventstream/subscriber.go index 750699d..0ed2cf2 100644 --- a/eventstream/subscriber.go +++ b/eventstream/subscriber.go @@ -29,7 +29,7 @@ import ( "github.com/google/uuid" - "github.com/tochemey/ego/internal/queue" + "github.com/tochemey/ego/v2/internal/queue" ) // Subscriber defines the Subscriber Interface diff --git a/example/main.go b/example/main.go index adffe0f..922129e 100644 --- a/example/main.go +++ b/example/main.go @@ -35,9 +35,9 @@ import ( "github.com/google/uuid" "google.golang.org/protobuf/proto" - "github.com/tochemey/ego" - "github.com/tochemey/ego/eventstore/memory" - samplepb "github.com/tochemey/ego/example/pbs/sample/pb/v1" + "github.com/tochemey/ego/v2" + "github.com/tochemey/ego/v2/eventstore/memory" + samplepb "github.com/tochemey/ego/v2/example/pbs/sample/pb/v1" ) func main() { diff --git a/example/pbs/sample/pb/v1/sample.pb.go b/example/pbs/sample/pb/v1/sample.pb.go index f1c0a70..7921454 100644 --- a/example/pbs/sample/pb/v1/sample.pb.go +++ b/example/pbs/sample/pb/v1/sample.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v2.31.0 // protoc (unknown) -// source: sample/pb/v1/sample.proto +// source: sample/pb/v2/sample.proto package samplepb @@ -451,13 +451,13 @@ func file_sample_pb_v1_sample_proto_rawDescGZIP() []byte { var file_sample_pb_v1_sample_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_sample_pb_v1_sample_proto_goTypes = []interface{}{ - (*Ping)(nil), // 0: sample.v1.Ping - (*Pong)(nil), // 1: sample.v1.Pong - (*Account)(nil), // 2: sample.v1.Account - (*CreateAccount)(nil), // 3: sample.v1.CreateAccount - (*CreditAccount)(nil), // 4: sample.v1.CreditAccount - (*AccountCreated)(nil), // 5: sample.v1.AccountCreated - (*AccountCredited)(nil), // 6: sample.v1.AccountCredited + (*Ping)(nil), // 0: sample.v2.Ping + (*Pong)(nil), // 1: sample.v2.Pong + (*Account)(nil), // 2: sample.v2.Account + (*CreateAccount)(nil), // 3: sample.v2.CreateAccount + (*CreditAccount)(nil), // 4: sample.v2.CreditAccount + (*AccountCreated)(nil), // 5: sample.v2.AccountCreated + (*AccountCredited)(nil), // 6: sample.v2.AccountCredited } var file_sample_pb_v1_sample_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/go.mod b/go.mod index 0b35dc2..37cbffc 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/tochemey/ego +module github.com/tochemey/ego/v2 go 1.21 diff --git a/helper_test.go b/helper_test.go index 77c1cdd..abb6f52 100644 --- a/helper_test.go +++ b/helper_test.go @@ -30,7 +30,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/types/known/emptypb" - testpb "github.com/tochemey/ego/test/data/pb/v1" + testpb "github.com/tochemey/ego/v2/test/data/pb/v1" ) // AccountEntityBehavior implement EntityBehavior diff --git a/offsetstore/iface.go b/offsetstore/iface.go index 6e773b5..5917ae2 100644 --- a/offsetstore/iface.go +++ b/offsetstore/iface.go @@ -27,7 +27,7 @@ package offsetstore import ( "context" - "github.com/tochemey/ego/egopb" + "github.com/tochemey/ego/v2/egopb" ) // OffsetStore defines the contract needed to persist offsets diff --git a/offsetstore/memory/memory.go b/offsetstore/memory/memory.go index 2a007a8..81414ff 100644 --- a/offsetstore/memory/memory.go +++ b/offsetstore/memory/memory.go @@ -34,9 +34,9 @@ import ( "github.com/pkg/errors" "go.uber.org/atomic" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/internal/telemetry" - "github.com/tochemey/ego/offsetstore" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/internal/telemetry" + "github.com/tochemey/ego/v2/offsetstore" ) // OffsetStore implements the offset store interface diff --git a/offsetstore/memory/memory_test.go b/offsetstore/memory/memory_test.go index 8d756b4..b1fad8f 100644 --- a/offsetstore/memory/memory_test.go +++ b/offsetstore/memory/memory_test.go @@ -33,8 +33,8 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/offsetstore" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/offsetstore" ) func TestOffsetStore(t *testing.T) { diff --git a/offsetstore/postgres/postgres.go b/offsetstore/postgres/postgres.go index 1fab6e9..3cac605 100644 --- a/offsetstore/postgres/postgres.go +++ b/offsetstore/postgres/postgres.go @@ -36,9 +36,9 @@ import ( "github.com/tochemey/gopack/postgres" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/internal/telemetry" - "github.com/tochemey/ego/offsetstore" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/internal/telemetry" + "github.com/tochemey/ego/v2/offsetstore" ) var ( diff --git a/offsetstore/postgres/postgres_test.go b/offsetstore/postgres/postgres_test.go index 3141e32..254f846 100644 --- a/offsetstore/postgres/postgres_test.go +++ b/offsetstore/postgres/postgres_test.go @@ -35,8 +35,8 @@ import ( "github.com/tochemey/gopack/postgres" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/offsetstore" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/offsetstore" ) func TestPostgresOffsetStore(t *testing.T) { diff --git a/projection/actor.go b/projection/actor.go index 72977b1..323a4ea 100644 --- a/projection/actor.go +++ b/projection/actor.go @@ -32,8 +32,8 @@ import ( "github.com/tochemey/goakt/v2/actors" "github.com/tochemey/goakt/v2/goaktpb" - "github.com/tochemey/ego/eventstore" - "github.com/tochemey/ego/offsetstore" + "github.com/tochemey/ego/v2/eventstore" + "github.com/tochemey/ego/v2/offsetstore" ) // Start is used to start the projection diff --git a/projection/actor_test.go b/projection/actor_test.go index 150d4ea..3a48f3e 100644 --- a/projection/actor_test.go +++ b/projection/actor_test.go @@ -39,10 +39,10 @@ import ( "github.com/tochemey/goakt/v2/actors" "github.com/tochemey/goakt/v2/log" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore/memory" - memoffsetstore "github.com/tochemey/ego/offsetstore/memory" - testpb "github.com/tochemey/ego/test/data/pb/v1" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore/memory" + memoffsetstore "github.com/tochemey/ego/v2/offsetstore/memory" + testpb "github.com/tochemey/ego/v2/test/data/pb/v1" ) func TestActor(t *testing.T) { diff --git a/projection/runner.go b/projection/runner.go index 985aae8..9832ea0 100644 --- a/projection/runner.go +++ b/projection/runner.go @@ -37,10 +37,10 @@ import ( "github.com/tochemey/goakt/v2/log" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore" - "github.com/tochemey/ego/internal/telemetry" - "github.com/tochemey/ego/offsetstore" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore" + "github.com/tochemey/ego/v2/internal/telemetry" + "github.com/tochemey/ego/v2/offsetstore" ) // runner defines the projection runner diff --git a/projection/runner_test.go b/projection/runner_test.go index 155b30b..9e39e28 100644 --- a/projection/runner_test.go +++ b/projection/runner_test.go @@ -40,10 +40,10 @@ import ( "github.com/tochemey/goakt/v2/log" - "github.com/tochemey/ego/egopb" - "github.com/tochemey/ego/eventstore/memory" - memoffsetstore "github.com/tochemey/ego/offsetstore/memory" - testpb "github.com/tochemey/ego/test/data/pb/v1" + "github.com/tochemey/ego/v2/egopb" + "github.com/tochemey/ego/v2/eventstore/memory" + memoffsetstore "github.com/tochemey/ego/v2/offsetstore/memory" + testpb "github.com/tochemey/ego/v2/test/data/pb/v1" ) func TestProjection(t *testing.T) { diff --git a/protos/ego/v1/ego.proto b/protos/ego/v2/ego.proto similarity index 97% rename from protos/ego/v1/ego.proto rename to protos/ego/v2/ego.proto index e3cf3f0..16df8af 100644 --- a/protos/ego/v1/ego.proto +++ b/protos/ego/v2/ego.proto @@ -4,7 +4,7 @@ package ego.v1; import "google/protobuf/any.proto"; -option go_package = "github.com/tochemey/ego/v1;egopb"; +option go_package = "github.com/tochemey/ego/v2;egopb"; // Event defines the event that needs to be persisted onto the events store message Event { diff --git a/protos/test/buf.yaml b/protos/test/buf.yaml index 9fbc669..af7819e 100644 --- a/protos/test/buf.yaml +++ b/protos/test/buf.yaml @@ -1,4 +1,4 @@ -version: v1 +version: v2 lint: use: - DEFAULT diff --git a/protos/test/pb/v1/test.proto b/protos/test/pb/v2/test.proto similarity index 89% rename from protos/test/pb/v1/test.proto rename to protos/test/pb/v2/test.proto index a7d98cc..d596a6f 100644 --- a/protos/test/pb/v1/test.proto +++ b/protos/test/pb/v2/test.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package tests.v1; -option go_package = "github.com/tochemey/ego/tests/v1;testpb"; +option go_package = "github.com/tochemey/ego/tests/v2;testpb"; message TestReply {} message TestPanic {} diff --git a/readme.md b/readme.md index 552fdd9..44524e1 100644 --- a/readme.md +++ b/readme.md @@ -84,7 +84,7 @@ import ( "github.com/google/uuid" "github.com/tochemey/ego" "github.com/tochemey/ego/eventstore/memory" - samplepb "github.com/tochemey/ego/example/pbs/sample/pb/v1" + samplepb "github.com/tochemey/ego/example/pbs/sample/pb/v2" "google.golang.org/protobuf/proto" ) diff --git a/test/data/pb/v1/test.pb.go b/test/data/pb/v1/test.pb.go index 64e71f0..ba3d2e4 100644 --- a/test/data/pb/v1/test.pb.go +++ b/test/data/pb/v1/test.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v2.31.0 // protoc (unknown) -// source: test/pb/v1/test.proto +// source: test/pb/v2/test.proto package testpb @@ -586,17 +586,17 @@ func file_test_pb_v1_test_proto_rawDescGZIP() []byte { var file_test_pb_v1_test_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_test_pb_v1_test_proto_goTypes = []interface{}{ - (*TestReply)(nil), // 0: tests.v1.TestReply - (*TestPanic)(nil), // 1: tests.v1.TestPanic - (*TestTimeout)(nil), // 2: tests.v1.TestTimeout - (*Reply)(nil), // 3: tests.v1.Reply - (*TestSend)(nil), // 4: tests.v1.TestSend - (*Account)(nil), // 5: tests.v1.Account - (*CreateAccount)(nil), // 6: tests.v1.CreateAccount - (*CreditAccount)(nil), // 7: tests.v1.CreditAccount - (*AccountCreated)(nil), // 8: tests.v1.AccountCreated - (*AccountCredited)(nil), // 9: tests.v1.AccountCredited - (*TestNoEvent)(nil), // 10: tests.v1.TestNoEvent + (*TestReply)(nil), // 0: tests.v2.TestReply + (*TestPanic)(nil), // 1: tests.v2.TestPanic + (*TestTimeout)(nil), // 2: tests.v2.TestTimeout + (*Reply)(nil), // 3: tests.v2.Reply + (*TestSend)(nil), // 4: tests.v2.TestSend + (*Account)(nil), // 5: tests.v2.Account + (*CreateAccount)(nil), // 6: tests.v2.CreateAccount + (*CreditAccount)(nil), // 7: tests.v2.CreditAccount + (*AccountCreated)(nil), // 8: tests.v2.AccountCreated + (*AccountCredited)(nil), // 9: tests.v2.AccountCredited + (*TestNoEvent)(nil), // 10: tests.v2.TestNoEvent } var file_test_pb_v1_test_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type