1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-02-19 19:00:14 +02:00
notify/service/whatsapp/whatsapp.go
2022-10-25 09:00:35 +02:00

26 lines
1.0 KiB
Go

package whatsapp
import (
"context"
)
// Service encapsulates the WhatsApp client along with internal state for storing contacts.
type Service struct{}
// New returns a new instance of a WhatsApp notification service.
func New() (*Service, error) { return &Service{}, nil }
// LoginWithSessionCredentials provides helper for authentication using whatsapp.Session credentials.
func (s *Service) LoginWithSessionCredentials(_, _, _, _ string, _, _ []byte) error { return nil }
// LoginWithQRCode provides helper for authentication using QR code on terminal.
// Refer: https://github.com/Rhymen/go-whatsapp#login for more information.
func (s *Service) LoginWithQRCode() error { return nil }
// AddReceivers takes WhatsApp contacts and adds them to the internal contacts list. The Send method will send
// a given message to all those contacts.
func (s *Service) AddReceivers(_ ...string) {}
// Send takes a message subject and a message body and sends them to all previously set contacts.
func (s *Service) Send(_ context.Context, _, _ string) error { return nil }