event

package
v0.0.0-...-ac32a2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

func (uv *UserEventClient) PublishNewUserRegisteredEvent(ctx context.Context, user ua.User) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL