processors

package
v0.0.0-...-427f305 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailPayload

type EmailPayload struct {
	To    string `json:"to"`
	Title string `json:"title"`
	Body  string `json:"body"`
}

type EmailProcessor

type EmailProcessor struct {
	// contains filtered or unexported fields
}

func NewEmailProcessor

func NewEmailProcessor(config config.API) *EmailProcessor

func (*EmailProcessor) ProcessTask

func (ep *EmailProcessor) ProcessTask(ctx context.Context, msg *task.Message) error

func (*EmailProcessor) ValidatePayload

func (ep *EmailProcessor) ValidatePayload(payload []byte) error

type FooPayload

type FooPayload struct {
	Bar string `json:"bar"`
	Baz string `json:"baz"`
}

type FooProcessor

type FooProcessor struct {
}

func NewFooProcessor

func NewFooProcessor() *FooProcessor

func (*FooProcessor) ProcessTask

func (ep *FooProcessor) ProcessTask(ctx context.Context, msg *task.Message) error

func (*FooProcessor) ValidatePayload

func (ep *FooProcessor) ValidatePayload(payload []byte) error

type Processor

type Processor interface {
	ProcessTask(context.Context, *task.Message) error
	ValidatePayload(payload []byte) error
}

func ProcessorFactory

func ProcessorFactory(config config.API, name task.Name) (Processor, error)

type SMSPayload

type SMSPayload struct {
	Phone string `json:"phone"`
	Text  string `json:"text"`
}

type SMSProcessor

type SMSProcessor struct {
	// contains filtered or unexported fields
}

func NewSMSProcessor

func NewSMSProcessor(config config.API) *SMSProcessor

func (*SMSProcessor) ProcessTask

func (sp *SMSProcessor) ProcessTask(ctx context.Context, msg *task.Message) error

func (*SMSProcessor) ValidatePayload

func (sp *SMSProcessor) ValidatePayload(payload []byte) error

type SlackPayload

type SlackPayload struct {
	Channel string `json:"channel"`
	Text    string `json:"text"`
}

type SlackProcessor

type SlackProcessor struct {
	// contains filtered or unexported fields
}

func NewSlackProcessor

func NewSlackProcessor(config config.API) *SlackProcessor

func (*SlackProcessor) ProcessTask

func (sp *SlackProcessor) ProcessTask(ctx context.Context, msg *task.Message) error

func (*SlackProcessor) ValidatePayload

func (sp *SlackProcessor) ValidatePayload(payload []byte) error

Jump to

Keyboard shortcuts

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