Messaging service, adapters, refactoring

This commit is contained in:
2023-12-07 09:00:30 +03:00
parent cf00cfaab6
commit 08a7c9c04f
18 changed files with 623 additions and 53 deletions

View File

@@ -0,0 +1,25 @@
package stdoutstore
import (
"context"
"fmt"
)
func New() *Service {
return &Service{}
}
type Service struct {
}
func (s *Service) StoreReceived(_ context.Context, sender, message string) error {
fmt.Printf("Received '%s' from <%s>\n", message, sender)
return nil
}
func (s *Service) StoreSent(_ context.Context, sender, message string) error {
fmt.Printf("Sent '%s' to <%s>\n", message, sender)
return nil
}