-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mehdihadeli
committed
Sep 26, 2022
1 parent
8786f45
commit 054cae0
Showing
59 changed files
with
808 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"buildTargets":[".PHONY","cert","docker-compose_infra_down","docker-compose_infra_up","docker_clean","docker_down","docker_logs","docker_path","execute_k6_catalogs_read_service","execute_k6_catalogs_write_service","generate_load_test_client_catalogs_read_service","generate_load_test_client_catalogs_write_service","key","pprof_allocs","pprof_cpu","pprof_heap","proto_catalogs_read_product_service","proto_catalogs_write_product_service","proto_orders_order_service","run-linter","run_catalogs_read_service","run_catalogs_write_service","swagger_catalogs_read","swagger_catalogs_write","swagger_orders"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} | ||
{"buildTargets":[".PHONY","_path","cert","docker-compose_infra_down","docker-compose_infra_up","docker_clean","docker_down","docker_logs","execute_k6_catalogs_read_service","execute_k6_catalogs_write_service","generate_load_test_client_catalogs_read_service","generate_load_test_client_catalogs_write_service","key","pprof_allocs","pprof_cpu","pprof_heap","proto_catalogs_read_product_service","proto_catalogs_write_product_service","proto_orders_order_service","run-linter","run_catalogs_read_service","run_catalogs_write_service","swagger_catalogs_read","swagger_catalogs_write","swagger_orders"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package domain | ||
|
||
import "github.com/mehdihadeli/store-golang-microservice-sample/pkg/core" | ||
import ( | ||
"github.com/mehdihadeli/store-golang-microservice-sample/pkg/core/metadata" | ||
) | ||
|
||
type EventEnvelope struct { | ||
EventData interface{} | ||
Metadata core.Metadata | ||
Metadata metadata.Metadata | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package metadata | ||
|
||
import ( | ||
messageHeader "github.com/mehdihadeli/store-golang-microservice-sample/pkg/messaging/message_header" | ||
"time" | ||
) | ||
|
||
func (m Metadata) GetCorrelationId() string { | ||
return m.GetString(messageHeader.CorrelationId) | ||
} | ||
|
||
func (m Metadata) SetCorrelationId(val string) { | ||
m.SetValue(messageHeader.CorrelationId, val) | ||
} | ||
|
||
func (m Metadata) GetMessageId() string { | ||
return m.GetString(messageHeader.MessageId) | ||
} | ||
|
||
func (m Metadata) SetMessageId(val string) { | ||
m.SetValue(messageHeader.MessageId, val) | ||
} | ||
|
||
func (m Metadata) GetMessageName() string { | ||
return m.GetString(messageHeader.Name) | ||
} | ||
|
||
func (m Metadata) SetMessageName(val string) { | ||
m.SetValue(messageHeader.Name, val) | ||
} | ||
|
||
func (m Metadata) GetMessageType() string { | ||
return m.GetString(messageHeader.Type) | ||
} | ||
|
||
func (m Metadata) SetMessageType(val string) { | ||
m.SetValue(messageHeader.Type, val) | ||
} | ||
|
||
func (m Metadata) GetMessageCreated() time.Time { | ||
return m.GetTime(messageHeader.Created) | ||
} | ||
|
||
func (m Metadata) SetMessageCreated(val time.Time) { | ||
m.SetValue(messageHeader.Created, val) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package serializer | ||
|
||
import "github.com/mehdihadeli/store-golang-microservice-sample/pkg/core" | ||
import ( | ||
"github.com/mehdihadeli/store-golang-microservice-sample/pkg/core/metadata" | ||
) | ||
|
||
type MetadataSerializer interface { | ||
Serialize(meta core.Metadata) ([]byte, error) | ||
Deserialize(bytes []byte) (core.Metadata, error) | ||
Serialize(meta metadata.Metadata) ([]byte, error) | ||
Deserialize(bytes []byte) (metadata.Metadata, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.