service

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVICE_SMS       = "sms"
	SERVICE_WHATSAPP  = "whatsapp"
	SERVICE_EMAIL     = "email"
	SERVICE_OTP_SMS   = "otp_sms"
	SERVICE_OTP_EMAIL = "otp_email"
)

Variables

This section is empty.

Functions

func OnDelete added in v1.0.11

func OnDelete(f DeleteFn)

func OnGet added in v1.0.11

func OnGet(f GetFn)

func OnGetTemplate added in v1.0.11

func OnGetTemplate(f GetTemplateFn)

func OnSet added in v1.0.11

func OnSet(f SetFn)

func SendEmail

func SendEmail(tenantId, serviceId string, from et.Json, to []et.Json, subject string, htmlContent string, params et.Json, tp TpMessage, createdBy string) (et.Items, error)

* * SendEmail * @param tenantId, serviceId string, from et.Json, to []et.Json, subject string, htmlContent string, params []et.Json, tp TpMessage, createdBy string * @response et.Items, error *

func SendEmailByTemplateId added in v1.0.11

func SendEmailByTemplateId(tenantId, serviceId string, from et.Json, to []et.Json, subject string, templateId string, params et.Json, tp TpMessage, createdBy string) (et.Items, error)

* * SendEmailByTemplateId * @param tenantId, serviceId string, from et.Json, to []et.Json, subject string, templateId string, params et.Json, tp TpMessage, createdBy string * @response et.Items, error *

func SendOTPByTemplateId added in v1.0.11

func SendOTPByTemplateId(tenantId, serviceId string, from et.Json, name, email string, length int, duration time.Duration, templateId string, createdBy string) (et.Items, error)

* * SendOTPByTemplateId * @param tenantId, serviceId string, from et.Json, name, email string, length int, duration time.Duration, templateId string, createdBy string * @response et.Items, error *

func SendOTPEmail added in v1.0.11

func SendOTPEmail(tenantId, serviceId string, from et.Json, name, email string, length int, duration time.Duration, createdBy string) (et.Items, error)

* * SendOTPEmail * @param tenantId, serviceId string, from et.Json, name, email string, length int, duration time.Duration, createdBy string * @response et.Items, error *

func SendOTPSMS added in v1.0.11

func SendOTPSMS(tenantId, serviceId, sender, countryCode, phoneNumber string, length int, duration time.Duration, createdBy string) (et.Items, error)

* * SendOTPSMS * @param tenantId, serviceId, countryCode, phoneNumber string, length int, duration time.Duration, createdBy string * @response et.Items, error *

func SendSms

func SendSms(tenantId, serviceId string, contactNumbers []string, content string, params et.Json, tp TpMessage, createdBy string) (et.Items, error)

* * SendSms * @param tenantId string, contactNumbers []string, content string, params et.Json, tp TpMessage, createdBy string * @response et.Item, error *

func SendWhatsapp

func SendWhatsapp(tenantId, serviceId, templateId string, contactNumbers []string, params []et.Json, tp TpMessage, createdBy string) (et.Items, error)

* * SendWhatsapp * @param tenantId, serviceId, templateId string, contactNumbers []string, params []et.Json, tp TpMessage, createdBy string * @response et.Items, error *

func VerifyOTP added in v1.0.11

func VerifyOTP(channel string, otp, createdBy string) (bool, error)

* * VerifyOTP * @param channel string, otp, createdBy string * @response bool, error *

Types

type DeleteFn added in v1.0.11

type DeleteFn func(id string) error

type GetFn added in v1.0.11

type GetFn func(id string) (string, error)

type GetTemplateFn added in v1.0.11

type GetTemplateFn func(id string) (string, error)

type SetFn added in v1.0.11

type SetFn func(id string, data et.Json) error

type TpMessage

type TpMessage int
const (
	TypeNotification TpMessage = iota
	TypeComercial
	TypeAutentication
)

func IntToTpMessage

func IntToTpMessage(i int) TpMessage

func (TpMessage) String

func (tp TpMessage) String() string

Jump to

Keyboard shortcuts

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