Components
type AddressType
type ApiCompatibleJsonConverterConfigs
ApiCompatibleJsonConverterConfigs represents the configuration for converting to JSON.
type AudioMessage
AudioMessage represents an audio message.
func NewAudioMessage
NewAudioMessage creates a new AudioMessage object.
func (*AudioMessage) ToJson
ToJson converts the AudioMessage object to JSON.
type AudioMessageApiPayload
AudioMessageApiPayload represents the payload for an audio message API request.
type AudioMessageConfigs
AudioMessageConfigs is an alias for AudioMessage.
type BaseMessage
BaseMessage is an interface for sending messages.
type BaseMessagePayload
BaseMessagePayload represents the base payload to send messages.
func NewBaseMessagePayload
NewBaseMessagePayload creates a new instance of BaseMessagePayload.
type Contact
func NewContact
func (*Contact) AddEmail
func (*Contact) AddPhone
func (*Contact) AddUrl
func (*Contact) SetBirthday
! TODO: add regex check here in the params
func (*Contact) SetFirstName
func (*Contact) SetLastName
func (*Contact) SetMiddleName
func (*Contact) SetOrg
type ContactAddress
type ContactEmail
type ContactMessage
func NewContactMessage
func (*ContactMessage) AddContact
func (*ContactMessage) ToJson
type ContactMessageApiPayload
type ContactMessageConfigs
type ContactName
type ContactOrg
type ContactPhone
type ContactUrl
type Context
Context represents the context of the message.
type DocumentMessage
DocumentMessage represents a document message.
func NewDocumentMessage
NewDocumentMessage creates a new DocumentMessage instance.
func (*DocumentMessage) ToJson
ToJson converts the DocumentMessage instance to JSON.
type DocumentMessageApiPayload
DocumentMessageApiPayload represents the API payload for a document message.
type DocumentMessageConfigs
DocumentMessageConfigs represents the configurations for a document message.
type EmailType
type ImageMessage
ImageMessage represents a message with an image.
func NewImageMessage
NewImageMessage creates a new ImageMessage instance.
func (*ImageMessage) SetCaption
SetCaption sets the caption for the image message.
func (*ImageMessage) ToJson
ToJson converts the ImageMessage to JSON.
type ImageMessageApiPayload
ImageMessageApiPayload represents the API payload for an image message.
type ImageMessageConfigs
ImageMessageConfigs is an alias for ImageMessage.
type InteractiveMessageType
type ListMessageApiPayload
ListMessageApiPayload represents the API payload for the list message.
type ListMessageBody
ListMessageBody represents the body of the list message.
type ListMessageParams
ListMessageParams represents the parameters for creating a list message.
type LocationMessage
LocationMessage represents a location message with latitude, longitude, address, and name.
func NewLocationMessage
NewLocationMessage creates a new LocationMessage with the given latitude and longitude.
func (*LocationMessage) SetAddress
SetAddress sets the address of the location.
func (*LocationMessage) SetName
SetName sets the name of the location.
func (*LocationMessage) ToJson
ToJson converts the LocationMessage to JSON with the given configurations.
type LocationMessageApiPayload
LocationMessageApiPayload represents the API payload for a location message.
type MessageType
MessageType represents the type of message.
Constants for different message types.
type Order
Order represents an order in the system.
type PhoneType
type ProductItem
ProductItem represents a product item in an order.
type ProductListMessage
ProductListMessage represents a product list message.
func NewProductListMessage
NewProductListMessage creates a new product list message.
func (*ProductListMessage) ToJson
ToJson converts the product list message to JSON.
type ProductListMessageApiPayload
ProductListMessageApiPayload represents the API payload for a product list message.
type ProductListMessageParams
ProductListMessageParams represents the parameters for creating a product list message.
type ProductMessage
ProductMessage represents a product message.
func NewProductMessage
NewProductMessage creates a new product message with the given parameters.
func (*ProductMessage) ToJson
ToJson converts the product message to JSON with the given configurations.
type ProductMessageApiPayload
ProductMessageApiPayload represents the API payload for a product message.
type ProductMessageParams
ProductMessageParams represents the parameters for creating a product message.
type QuickReplyButtonMessage
QuickReplyButtonMessage represents a quick reply button message.
func NewQuickReplyButtonMessage
NewQuickReplyButtonMessage creates a new quick reply button message with the given body text.
func (*QuickReplyButtonMessage) AddButton
func (*QuickReplyButtonMessage) ToJson
ToJson converts the quick reply button message to JSON.
type QuickReplyButtonMessageAction
QuickReplyButtonMessageAction represents the action of a quick reply button message.
type QuickReplyButtonMessageApiPayload
QuickReplyButtonMessageApiPayload represents the API payload for a quick reply button message.
type QuickReplyButtonMessageBody
QuickReplyButtonMessageBody represents the body of a quick reply button message.
type ReactionMessage
ReactionMessage represents a reaction to a message.
func NewReactionMessage
NewReactionMessage creates a new ReactionMessage instance.
func (*ReactionMessage) ToJson
ToJson converts the ReactionMessage to JSON.
type ReactionMessageApiPayload
ReactionMessageApiPayload represents the API payload for a reaction message.
type ReactionMessageParams
ReactionMessageParams is an alias for ReactionMessage.
type StickerMessage
StickerMessage represents a sticker message.
func NewStickerMessage
NewStickerMessage creates a new sticker message based on the provided configurations.
func (*StickerMessage) ToJson
ToJson converts the sticker message to JSON based on the provided configurations.
type StickerMessageApiPayload
StickerMessageApiPayload represents the API payload for a sticker message.
type StickerMessageConfigs
StickerMessageConfigs represents the configurations for a sticker message.
type TemplateMessage
TemplateMessage represents a template message.
func NewTemplateMessage
NewTemplateMessage creates a new instance of TemplateMessage.
type TemplateMessageApiPayload
TemplateMessageApiPayload represents the API payload for a template message.
type TextMessageApiPayload
TextMessageApiPayload represents the payload for the WhatsApp API.
type TextMessageApiPayloadText
TextMessageApiPayloadText represents the text payload for the WhatsApp API.
type TextMessageConfigs
TextMessageConfigs represents the configuration options for a text message.
type UrlType
type VideoMessage
VideoMessage represents a video message.
func NewVideoMessage
NewVideoMessage creates a new VideoMessage instance.
func (*VideoMessage) SetCaption
SetCaption sets the caption for the video message.
func (*VideoMessage) ToJson
ToJson converts the video message to JSON.
type VideoMessageApiPayload
VideoMessageApiPayload represents the API payload for a video message.
type VideoMessageConfigs
VideoMessageConfigs is an alias for VideoMessage.
type listMessage
listMessage represents an interactive list message.
func NewListMessage
NewListMessage creates a new list message with the given parameters.
func (*listMessage) AddSection
AddSection adds a new section to the list message.
func (*listMessage) SetBodyText
SetBodyText sets the body text of the list message.
func (*listMessage) ToJson
ToJson converts the list message to JSON.
type listMessageAction
listMessageAction represents the action of the list message.
type listSection
listSection represents a section in the list message.
func NewListSection
NewListSection creates a new list section with the given title.
func (*listSection) AddRow
AddRow adds a new row to the list section.
func (*listSection) SetTitle
SetTitle sets the title of the list section.
type listSectionRow
listSectionRow represents a row in the list section.
func NewListSectionRow
NewListSectionRow creates a new list section row with the given ID, title, and description.
func (*listSectionRow) SetDescription
SetDescription sets the description of the list section row.
func (*listSectionRow) SetId
SetId sets the ID of the list section row.
func (*listSectionRow) SetTitle
SetTitle sets the title of the list section row.
type quickReplyButtonMessageButton
quickReplyButtonMessageButton represents a quick reply button.
func NewQuickReplyButton
NewQuickReplyButton creates a new quick reply button with the given ID and title.
type quickReplyButtonMessageButtonReply
quickReplyButtonMessageButtonReply represents the reply structure of a quick reply button.
type textMessage
textMessage represents a text message.
func NewTextMessage
NewTextMessage creates a new text message with the given configurations.
func (*textMessage) SetText
SetText sets the text content of the message.
func (*textMessage) ToJson
ToJson converts the text message struct to WhatsApp API compatible JSON.