Documentation
¶
Index ¶
- Variables
- func TrackInbound(instanceID, chatJID, messageID, senderJID string)
- type ContactEntry
- type EnqueueInput
- type OutboxWorker
- type SendInput
- type Service
- func (s *Service) Enqueue(ctx context.Context, input EnqueueInput) (model.Message, error)
- func (s *Service) List(ctx context.Context, instanceID string) ([]model.Message, error)
- func (s *Service) ResolveJID(ctx context.Context, client *whatsmeow.Client, phone string) (types.JID, error)
- func (s *Service) Send(ctx context.Context, input SendInput) (model.Message, error)
- type SessionManager
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func TrackInbound ¶ added in v1.1.0
func TrackInbound(instanceID, chatJID, messageID, senderJID string)
TrackInbound stores the last inbound message ID for a given chat. Called by the event handler when a message is received. The Send function uses this to auto-mark messages as read before sending.
Types ¶
type ContactEntry ¶ added in v1.1.0
type EnqueueInput ¶
type OutboxWorker ¶ added in v1.0.10
type OutboxWorker struct {
// contains filtered or unexported fields
}
func NewOutboxWorker ¶ added in v1.0.10
func (*OutboxWorker) Start ¶ added in v1.0.10
func (w *OutboxWorker) Start(ctx context.Context)
func (*OutboxWorker) Stop ¶ added in v1.0.10
func (w *OutboxWorker) Stop()
type SendInput ¶
type SendInput struct {
InstanceID string
To string
Type string
Text string
MediaData []byte
MediaType string
Caption string
FileName string
Seconds int
PTT bool
MessageID string
Quoted string
Participant string
MentionedJids []string
MarkReadMessageID string
MarkReadSender string
DisplayName string
Vcard string
Contacts []ContactEntry
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo storage.MessageRepository, q queue.Queue, cfg config.WhatsAppConfig, log *zap.Logger) *Service
func NewServiceWithSession ¶
func NewServiceWithSession(repo storage.MessageRepository, sessionMgr SessionManager, instanceRepo storage.InstanceRepository, contactRepo storage.ContactRepository, eventLogRepo storage.EventLogRepository, q queue.Queue, cfg config.WhatsAppConfig, log *zap.Logger) *Service
func (*Service) ResolveJID ¶ added in v1.0.11
type SessionManager ¶
Click to show internal directories.
Click to hide internal directories.