message

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPayload       = errors.New("payload inválido")
	ErrInstanceNotConnected = errors.New("instância não conectada")
	ErrInvalidJID           = errors.New("JID inválido")
	ErrUnsupportedMediaType = errors.New("tipo de mídia não suportado")
)

Functions

This section is empty.

Types

type EnqueueInput

type EnqueueInput struct {
	InstanceID string
	To         string
	Type       string
	Payload    string
}

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
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(repo storage.MessageRepository) *Service

func NewServiceWithSession

func NewServiceWithSession(repo storage.MessageRepository, sessionMgr SessionManager, instanceRepo storage.InstanceRepository) *Service

func (*Service) Enqueue

func (s *Service) Enqueue(ctx context.Context, input EnqueueInput) (model.Message, error)

func (*Service) List

func (s *Service) List(ctx context.Context, instanceID string) ([]model.Message, error)

func (*Service) Send

func (s *Service) Send(ctx context.Context, input SendInput) (model.Message, error)

type SessionManager

type SessionManager interface {
	GetClient(instanceID string) (*whatsmeow.Client, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL