message

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name       *string     `json:"name"`
	Parameters *Parameters `json:"parameters,omitempty"`
	Buttons    *[]Button   `json:"buttons,omitempty"`
}

type Button added in v1.1.0

type Button struct {
	Type  string `json:"type"`
	Reply Reply  `json:"reply"`
}

type Document

type Document struct {
	Link     string `json:"link"`
	Caption  string `json:"caption,omitempty"`
	Filename string `json:"filename,omitempty"`
}

type Envelope

type Envelope struct {
	MessagingProduct string           `json:"messaging_product"`
	RecipientType    string           `json:"recipient_type,omitempty"`
	To               string           `json:"to,omitempty"`
	Recipient        string           `json:"recipient,omitempty"`
	Type             string           `json:"type,omitempty"`
	Text             *Text            `json:"text,omitempty"`
	Image            *Image           `json:"image,omitempty"`
	Interactive      *Interactive     `json:"interactive,omitempty"`
	Document         *Document        `json:"document,omitempty"`
	Sticker          *Sticker         `json:"sticker,omitempty"`
	Status           string           `json:"status,omitempty"`
	TypingIndicator  *TypingIndicator `json:"typing_indicator,omitempty"`
	MessageID        string           `json:"message_id,omitempty"`
}

func NewDocument

func NewDocument(to string, opts NewDocumentOpts) Envelope
func NewImageLink(to string, opts NewImageLinkOpts) Envelope

func NewInteractiveFlow

func NewInteractiveFlow(to string, opts NewFlowOpts) Envelope

func NewInteractiveReplyButtons added in v1.1.0

func NewInteractiveReplyButtons(to string, opts InteractiveReplyButtonsOpts) Envelope

func NewMessageRead

func NewMessageRead(messageId string, typingIndicator bool) Envelope

func NewSticker

func NewSticker(to, link string) Envelope

func NewText

func NewText(to string, opts NewTextOpts) Envelope

type FlowAction

type FlowAction struct {
	Screen string `json:"screen"`
}

type Image

type Image struct {
	ID      string `json:"id,omitempty"`
	Link    string `json:"link,omitempty"`
	Caption string `json:"caption,omitempty"`
}

type Interactive

type Interactive struct {
	Type   string            `json:"type"`
	Header InteractiveHeader `json:"header"`
	Body   TextObject        `json:"body"`
	Footer *Text             `json:"footer,omitempty"`
	Action Action            `json:"action"`
}

type InteractiveHeader

type InteractiveHeader struct {
	Type string `json:"type"`
	Text string `json:"text,omitempty"`
}

type InteractiveReplyButtonsOpts added in v1.1.0

type InteractiveReplyButtonsOpts struct {
	Header  InteractiveHeader
	Body    string
	Buttons []Reply
}

type NewDocumentOpts

type NewDocumentOpts struct {
	Link     string
	Caption  string
	Filename string
}

type NewFlowOpts

type NewFlowOpts struct {
	Header      InteractiveHeader
	Body        TextObject
	Footer      *Text
	FlowMode    string
	FlowId      string
	FlowToken   string
	FlowCTA     string
	FirstScreen string
}

type NewImageLinkOpts

type NewImageLinkOpts struct {
	Link    string
	Caption string
}

type NewTextOpts

type NewTextOpts struct {
	Text       string
	PreviewURL *bool
}

type Parameters

type Parameters struct {
	Mode               string     `json:"mode,omitempty"`
	FlowMessageVersion string     `json:"flow_message_version"`
	FlowToken          string     `json:"flow_token"`
	FlowID             string     `json:"flow_id"`
	FlowCTA            string     `json:"flow_cta"`
	FlowAction         string     `json:"flow_action"`
	FlowActionPayload  FlowAction `json:"flow_action_payload,omitempty"`
}

type Reply added in v1.1.0

type Reply struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

type Sticker

type Sticker struct {
	Link string `json:"link"`
}

type Text

type Text struct {
	Body       string `json:"body"`
	PreviewURL *bool  `json:"preview_url,omitempty"`
}

type TextObject

type TextObject struct {
	Text string `json:"text"`
}

type TypingIndicator added in v1.3.0

type TypingIndicator struct {
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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