Documentation ¶
Index ¶
Constants ¶
View Source
const (
Secret = "secret"
)
Variables ¶
View Source
var ( Topic = "user-transactions" Partition int32 = 0 )
Functions ¶
func ConsumeUserRegistrationEvents ¶
func ConsumeUserRegistrationEvents(consumer sarama.PartitionConsumer, handleEventType func(msgVal []byte, e interface{}))
func NewKafkaConsumer ¶
func NewKafkaSyncProducer ¶
func NewKafkaSyncProducer() sarama.SyncProducer
func SubmitEvent ¶
func SubmitEvent(kafka sarama.SyncProducer, event interface{}) error
Types ¶
type AuthService ¶
type AuthService struct {
AuthRepository domain.AuthRepository
}
func (AuthService) Create ¶
func (s AuthService) Create(r *domain.UserRegistration) error
Create a new User Registration
func (AuthService) GetRegistrationByEmail ¶
func (s AuthService) GetRegistrationByEmail(email string) (*domain.UserRegistration, error)
Returns a User Registration by email
type UserService ¶
type UserService struct { UsersRepository domain.UserRepository EventsConsumer sarama.Consumer }
func (UserService) OnEventTypeHandle ¶
func (s UserService) OnEventTypeHandle(msgVal []byte, eventType interface{})
Click to show internal directories.
Click to hide internal directories.