webhook

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: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonReply added in v1.2.0

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

type Change

type Change struct {
	ID      string        `json:"id"`
	Changes []ValueObject `json:"changes"`
}

type Contact

type Contact struct {
	WhatsappID   string  `json:"wa_id"`
	UserID       string  `json:"user_id"`
	ParentUserID string  `json:"parent_user_id"`
	Profile      Profile `json:"profile"`
}

type Context added in v1.2.0

type Context struct {
	From string `json:"from"`
	ID   string `json:"id"`
}

type Interactive added in v0.2.0

type Interactive struct {
	Type        string       `json:"type"`
	NfmReply    *NfmReply    `json:"nfm_reply,omitempty"`
	ButtonReply *ButtonReply `json:"button_reply,omitempty"`
}

type Message

type Message struct {
	From             string      `json:"from"`
	FromUserID       string      `json:"from_user_id"`
	FromParentUserID string      `json:"from_parent_user_id"`
	ID               string      `json:"id"`
	Timestamp        string      `json:"timestamp"`
	Type             string      `json:"type"`
	Context          *Context    `json:"context"`
	Text             Text        `json:"text"`
	Interactive      Interactive `json:"interactive"`
}

func (Message) Time added in v0.3.0

func (m Message) Time() (time.Time, error)

Time parses the message's UNIX timestamp into a time.Time instance.

type Metadata

type Metadata struct {
	DisplayPhoneNumber string `json:"display_phone_number"`
	PhoneNumberID      string `json:"phone_number_id"`
}

type NfmReply added in v0.2.0

type NfmReply struct {
	Name         string `json:"name"`
	ResponseJson string `json:"response_json"`
}

type Notification

type Notification struct {
	Object string   `json:"object"`
	Entry  []Change `json:"entry"`
}

type Profile

type Profile struct {
	Name     string `json:"name"`
	Username string `json:"username"`
}

type Text

type Text struct {
	Body string `json:"body"`
}

type Value

type Value struct {
	MessagingProduct string    `json:"messaging_product"`
	Metadata         Metadata  `json:"metadata"`
	Contacts         []Contact `json:"contacts"`
	Messages         []Message `json:"messages"`
}

type ValueObject

type ValueObject struct {
	Value Value  `json:"value"`
	Field string `json:"field"`
}

Jump to

Keyboard shortcuts

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