messenger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHttpClient

func BuildHttpClient(httpClientTLS bool) *http.Client

BuildHttpClient builds http client

Types

type Messenger

type Messenger struct {
	Log        *logger.Logger
	HttpClient *http.Client
	Url        string
}

func InitMessenger

func InitMessenger(url string, tls bool, log *logger.Logger) *Messenger

InitMessenger instantiates messenger

func (*Messenger) SendMsgToWhatsapp

func (m *Messenger) SendMsgToWhatsapp(phone, msg string) (bool, string, error)

SendMsgToWhatsapp sends messages to the Whatsapp chat

type PostWhatsappMsg

type PostWhatsappMsg struct {
	Phone   string `json:"phone"`
	Message string `json:"message"`
}

PostWhatsappMsg defines the field parameters

type WhatsappResponse

type WhatsappResponse struct {
	Code     int64       `json:"code,omitempty"`
	ErrorMsg string      `json:"error,omitempty"`
	Message  string      `json:"message"`
	Data     interface{} `json:"data"`
}

WhatsappResponse defines the field parameters

Jump to

Keyboard shortcuts

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