mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 11:41:18 +00:00
feat: go report card
fix: comment and log misspellings
This commit is contained in:
@@ -41,7 +41,7 @@ type AuthService struct {
|
||||
}
|
||||
|
||||
// Interface for database methods
|
||||
// Allows implementing seperate controllers for different databases (e.g. Postgres, MongoDB, etc)
|
||||
// Allows implementing separate controllers for different databases (e.g. Postgres, MongoDB, etc)
|
||||
type StorageController interface {
|
||||
SetPassword(ctx context.Context, userId string, password string) error
|
||||
VerifyPassword(ctx context.Context, userId string, password string) (bool, error)
|
||||
@@ -50,7 +50,7 @@ type StorageController interface {
|
||||
}
|
||||
|
||||
// Interface for event consumption
|
||||
// Flexibility for seperate controllers for different messaging systems (e.g. Kafka, NATS, etc)
|
||||
// Flexibility for separate controllers for different messaging systems (e.g. Kafka, NATS, etc)
|
||||
type ConsumerController interface {
|
||||
messaging.ConsumerController
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ func (c *kafkaController) Start() {
|
||||
case messaging.User_State_Deleted_Topic:
|
||||
c.consumeUserDeletedEventTopic(ft)
|
||||
default:
|
||||
log.Warn().Str("topic", ft.Topic).Msg("consumer: recieved records from unexpected topic")
|
||||
log.Warn().Str("topic", ft.Topic).Msg("consumer: received records from unexpected topic")
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func (c *kafkaController) Stop() {
|
||||
}
|
||||
|
||||
func (c *kafkaController) consumeUserDeletedEventTopic(ft kgo.FetchTopic) {
|
||||
log.Info().Str("topic", ft.Topic).Msg("consumer: recieved records from topic")
|
||||
log.Info().Str("topic", ft.Topic).Msg("consumer: received records from topic")
|
||||
|
||||
// Process each message from the topic
|
||||
ft.EachRecord(func(record *kgo.Record) {
|
||||
|
||||
Reference in New Issue
Block a user