messages

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(c *fiber.Ctx) error

func ErrValues

func ErrValues(kind ErrorKind) (status int, code int, message string)

Types

type ErrorKind

type ErrorKind uint8
const (
	AuthTokenMalformed ErrorKind = iota
	AuthTokenInvalidAuthKind
	AuthTokenMissingAuthKind
	AuthTokenCannotBeDecrypted
	AuthTokenInvalidContentType
	RecipientPhoneNumberNotAllowed
)

type TemplateComponent added in v1.0.1

type TemplateComponent struct {
	Type       string `json:"type"`    // "body", "button"
	SubType    string `json:"subType"` // "quick_reply" (in case of button)
	Index      string `json:"index"`   // "0" (in case of button)
	Parameters []struct {
		Type    string `json:"type"`    // "header", "text", "payload"
		Payload string `json:"payload"` // "hello_world" (in case of payload)
		Text    string `json:"text"`    // "Hello World" (in case of text)
	} `json:"parameters"`
}

type TemplateOptions

type TemplateOptions struct {
	Name     string `json:"name"` // "hello_world",
	Language struct {
		Code   string `json:"code"`   // "en_US", "en"
		Policy string `json:"policy"` // "deterministic"
	} `json:"language"` // { "code": "en_US" }
	Components []TemplateComponent `json:"components"`
}

type TextOptions

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

Jump to

Keyboard shortcuts

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