topic

package
v0.0.0-...-f0c377f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string

type Message

type Message struct {
	EventType EventType   `json:"event_type"`
	Data      interface{} `json:"data"`
}

func NewMessage

func NewMessage(eventType EventType, data interface{}) *Message

type Service

type Service struct {
	TopicName string
	TopicArn  string
	// contains filtered or unexported fields
}

func (*Service) Publish

func (svc *Service) Publish(ctx context.Context, data *Message) (*string, error)

func (*Service) UpdateTopicArn

func (svc *Service) UpdateTopicArn(ctx context.Context) error

type TopicService

type TopicService interface {
	UpdateTopicArn(ctx context.Context) error
	Publish(ctx context.Context, data *Message) (*string, error)
}

func NewService

func NewService(topicName string, config aws.Config) TopicService

Jump to

Keyboard shortcuts

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