event

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvelopeService

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

func NewEnvelopeService

func NewEnvelopeService(envelopeService envelope.Service, pub *Pub) *EnvelopeService

func (*EnvelopeService) CreateEnvelope

func (es *EnvelopeService) CreateEnvelope(ctx context.Context, req *envelope.CreateEnvelopeRequest) (int64, error)

func (*EnvelopeService) DeleteEnvelope

func (es *EnvelopeService) DeleteEnvelope(ctx context.Context, msgID int64) error

func (*EnvelopeService) GetData

func (es *EnvelopeService) GetData(ctx context.Context, att *envelope.Attachment) ([]byte, error)

func (*EnvelopeService) GetDataSize

func (es *EnvelopeService) GetDataSize(ctx context.Context) (int64, error)

func (*EnvelopeService) GetEnvelope

func (es *EnvelopeService) GetEnvelope(ctx context.Context, msgID int64) (*envelope.Envelope, error)

func (*EnvelopeService) ListAttachment

func (es *EnvelopeService) ListAttachment(ctx context.Context, page *paginate.Page) ([]envelope.Attachment, error)

func (*EnvelopeService) ListEnvelope

func (es *EnvelopeService) ListEnvelope(ctx context.Context, page *paginate.Page) ([]envelope.Envelope, error)

type Event

type Event struct {
	Topic Topic
	Data  interface{}
}

type Pub

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

func NewPub

func NewPub() *Pub

func (*Pub) Publish

func (ps *Pub) Publish(ev Event)

func (*Pub) Subscribe

func (ps *Pub) Subscribe(topic Topic, ch chan<- Event)

type Topic

type Topic string
const (
	TopicEnvelopeCreated Topic = "envelope.created" // *envelope.Envelope
)

Jump to

Keyboard shortcuts

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