Documentation ¶
Index ¶
- Constants
- type UserEventClient
- func (ue *UserEventClient) Connection(nc *pubsubinfra.NatsConnection)
- func (ue *UserEventClient) GetConnection() *pubsubinfra.NatsConnection
- func (ue *UserEventClient) MarshalEventPayload(user ua.User) ([]byte, error)
- func (ue *UserEventClient) NewUserRegisteredEventFQN() string
- func (uv *UserEventClient) PublishNewUserRegisteredEvent(ctx context.Context, user ua.User) error
- func (uv *UserEventClient) SubscribeToNewUserRegisteredEvent(ctx context.Context, ch chan *nats.Msg) (pubsub_infra.ChannelUnsubscribeCallBack, error)
- type UserEventClientMock
- func (uecm UserEventClientMock) Connection(nc *pubsub_infra.NatsConnection)
- func (uecm UserEventClientMock) GetConnection() *pubsub_infra.NatsConnection
- func (uecm UserEventClientMock) PublishNewUserRegisteredEvent(ctx context.Context, user ua.User) error
- func (uecm UserEventClientMock) SubscribeToNewUserRegisteredEvent(ctx context.Context, ch chan *nats.Msg) (pubsub_infra.ChannelUnsubscribeCallBack, error)
Constants ¶
View Source
const NewUserRegisteredEventSubjectName = "NewUserRegistered"
View Source
const UserDomainTopicName = "User"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserEventClient ¶
type UserEventClient struct {
// contains filtered or unexported fields
}
func (*UserEventClient) Connection ¶
func (ue *UserEventClient) Connection(nc *pubsubinfra.NatsConnection)
func (*UserEventClient) GetConnection ¶
func (ue *UserEventClient) GetConnection() *pubsubinfra.NatsConnection
func (*UserEventClient) MarshalEventPayload ¶
func (ue *UserEventClient) MarshalEventPayload(user ua.User) ([]byte, error)
func (*UserEventClient) NewUserRegisteredEventFQN ¶
func (ue *UserEventClient) NewUserRegisteredEventFQN() string
NewUserRegisteredEventFQN retuens the fully qualified name (FQN) for new user registered event
func (*UserEventClient) PublishNewUserRegisteredEvent ¶
PublishNewUserRegisteredEvent publishes the user aggregate after successful user creation
func (*UserEventClient) SubscribeToNewUserRegisteredEvent ¶
func (uv *UserEventClient) SubscribeToNewUserRegisteredEvent(ctx context.Context, ch chan *nats.Msg) (pubsub_infra.ChannelUnsubscribeCallBack, error)
type UserEventClientMock ¶
type UserEventClientMock struct { }
func (UserEventClientMock) Connection ¶
func (uecm UserEventClientMock) Connection(nc *pubsub_infra.NatsConnection)
func (UserEventClientMock) GetConnection ¶
func (uecm UserEventClientMock) GetConnection() *pubsub_infra.NatsConnection
func (UserEventClientMock) PublishNewUserRegisteredEvent ¶
func (uecm UserEventClientMock) PublishNewUserRegisteredEvent(ctx context.Context, user ua.User) error
PublishNewUserRegisteredEvent publishes the user aggregate after successful user creation
func (UserEventClientMock) SubscribeToNewUserRegisteredEvent ¶
func (uecm UserEventClientMock) SubscribeToNewUserRegisteredEvent(ctx context.Context, ch chan *nats.Msg) (pubsub_infra.ChannelUnsubscribeCallBack, error)
Click to show internal directories.
Click to hide internal directories.