handler

package
v0.0.0-...-33f6294 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(repo IRepository, producer IProducer, external IExternalServiceClient) *Handler

func (*Handler) WalletTransactionsHandler

func (h *Handler) WalletTransactionsHandler(ctx context.Context, msg kafka.Message) error

func (*Handler) WalletUsersHandler

func (h *Handler) WalletUsersHandler(ctx context.Context, msg kafka.Message) error

type IExternalServiceClient

type IExternalServiceClient interface {
	CreateAccount(ctx context.Context, account *repository.Account) error
}

type IProducer

type IProducer interface {
	NewAccountEvent(ctx context.Context, account *repository.Account) error
	NewTransactionEvent(ctx context.Context, transaction *repository.Transaction) error
}

type IRepository

type IRepository interface {
	SaveAccount(ctx context.Context, account *repository.Account) error
	SaveTransaction(ctx context.Context, transaction *repository.Transaction) error
}

Jump to

Keyboard shortcuts

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