Documentation
¶
Index ¶
- func BindQueryParams(context echo.Context, dest interface{}) error
- func EnumExpression(value string) StringExpression
- func GenerateOtp() string
- func GenerateUniqueId() string
- func GenerateUniqueWebhookSecret(whatsappBusinessAccountId, organizationId, encryptionKey string) (string, error)
- func GenerateWebsocketEventId() string
- func IsValidEmail(email string) bool
- func ParsePhoneNumber(phoneNumber string) (*phonenumbers.PhoneNumber, error)
- func ParseUlid(id string) uint64
- type WebhookSecretData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindQueryParams ¶
func EnumExpression ¶
func EnumExpression(value string) StringExpression
func GenerateOtp ¶
func GenerateOtp() string
func GenerateUniqueId ¶
func GenerateUniqueId() string
func GenerateUniqueWebhookSecret ¶
func GenerateUniqueWebhookSecret(whatsappBusinessAccountId, organizationId, encryptionKey string) (string, error)
generateUniqueWebhookSecret returns an encrypted token that includes the WhatsAppBusinessAccountId and the organizationId. The token is opaque to external parties, but you can decrypt it internally to recover the data.
func GenerateWebsocketEventId ¶
func GenerateWebsocketEventId() string
func IsValidEmail ¶
func ParsePhoneNumber ¶
func ParsePhoneNumber(phoneNumber string) (*phonenumbers.PhoneNumber, error)
Types ¶
type WebhookSecretData ¶
type WebhookSecretData struct {
WhatsappBusinessAccountId string `json:"whatsapp_business_account_id"`
OrganizationId string `json:"organization_id"`
}
func DecryptWebhookSecret ¶
func DecryptWebhookSecret(token, encryptionKey string) (*WebhookSecretData, error)
decryptWebhookSecret does the reverse of generateUniqueWebhookSecret. It takes the token (nonce + ciphertext in base64), decrypts it, and returns the WABA ID and Organization ID.
Click to show internal directories.
Click to hide internal directories.