service

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_SEND_SMS               = "send:sms"
	EVENT_SEND_WHATSAPP          = "send:whatsapp"
	EVENT_SEND_EMAIL             = "send:email"
	EVENT_SEND_EMAIL_BY_TEMPLATE = "send:email:template"
	EVENT_SEND_PUSH              = "send:push"
	SERVICE_STATUS               = "service:status"
)

Events

View Source
const (
	STATUS_PENDING   = "pending"
	STATUS_SUCCESS   = "success"
	STATUS_FAILED    = "failed"
	STATUS_WORKING   = "working"
	STATUS_ERROR     = "error"
	STATUS_CANCELLED = "cancelled"
	STATUS_EXPIRED   = "expired"
)

Status

Variables

This section is empty.

Functions

func EventSendEmail added in v0.1.17

func EventSendEmail(projectId string, sender et.Json, to []et.Json, subject string, htmlContent string, params et.Json, tp TpMessage, createdBy string) string

* * EventSendEmail * @param projectId string, sender et.Json, to []et.Json, subject string, htmlContent string, params et.Json, tp TpMessage, createdBy string * @response string *

func EventSendSms added in v0.1.17

func EventSendSms(projectId string, contactNumbers []string, content string, params []et.Json, tp TpMessage, createdBy string) string

* * EventSendSms * @param projectId string, contactNumbers []string, content string, params []et.Json, tp TpMessage, createdBy string * @response string *

func EventSendWhatsapp added in v0.1.17

func EventSendWhatsapp(projectId, templateId string, contactNumbers []string, params []et.Json, tp TpMessage, createdBy string) string

* * EventSendWhatsapp * @param projectId, templateId string, contactNumbers []string, params []et.Json, tp TpMessage, createdBy string * @response string *

func GetById added in v0.1.17

func GetById(serviceId string) (et.Json, error)

* * GetById * @param serviceId string * @response et.Json, error *

func LoadEventSend added in v0.1.17

func LoadEventSend()

* * LoadEventSend * @response error *

func New added in v0.1.17

func New(projectId, kind, description, clientId string) string

* * New * @param projectId, kind, description, clientId string * @response string *

func SendEmail

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

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

func SendSms

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

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

func SendWhatsapp

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

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

func SetStatus

func SetStatus(serviceId, status string, context et.Json) error

* * SetStatus * @param serviceId, status string, context et.Json *

Types

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