translation

package
v0.0.0-...-122f59b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type EmailMessageData

type EmailMessageData struct {
	Sender   string
	ReplyTo  string
	Subject  string
	HTMLBody string
	TextBody string
}

type MessageSpec

type MessageSpec struct {
	Name              string
	TXTEmailTemplate  *template.PlainText
	HTMLEmailTemplate *template.HTML
	SMSTemplate       *template.PlainText
	WhatsappTemplate  *template.PlainText
}

func RegisterMessage

func RegisterMessage(msg *MessageSpec) *MessageSpec

type SMSMessageData

type SMSMessageData struct {
	Sender string
	Body   string
}

type Service

type Service struct {
	Context        context.Context
	TemplateEngine *template.Engine
	StaticAssets   StaticAssetResolver
	// contains filtered or unexported fields
}

func (*Service) EmailMessageData

func (s *Service) EmailMessageData(msg *MessageSpec, args interface{}) (*EmailMessageData, error)

func (*Service) GetSenderForTestEmail

func (s *Service) GetSenderForTestEmail() (sender string, err error)

func (*Service) HasKey

func (s *Service) HasKey(key string) (bool, error)

func (*Service) RenderText

func (s *Service) RenderText(key string, args interface{}) (string, error)

func (*Service) SMSMessageData

func (s *Service) SMSMessageData(msg *MessageSpec, args interface{}) (*SMSMessageData, error)

func (*Service) WhatsappMessageData

func (s *Service) WhatsappMessageData(language string, msg *MessageSpec, args interface{}) (*WhatsappMessageData, error)

type StaticAssetResolver

type StaticAssetResolver interface {
	StaticAssetURL(id string) (url string, err error)
}

type WhatsappMessageData

type WhatsappMessageData struct {
	Body string
}

Jump to

Keyboard shortcuts

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