interfaces

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventSender added in v0.0.7

type EventSender interface {
	SendEvent(ctx context.Context, event *models.Event) error
}

type EventStorage

type EventStorage interface {
	SaveEvent(ctx context.Context, event *models.Event) error
	GetEventByIdOwner(ctx context.Context, id, owner string) (*models.Event, error)
	GetEventsForNotification(ctx context.Context, startTime time.Time, period time.Duration) ([]*models.Event, error)
	GetEventsByOwnerStartDate(ctx context.Context, owner string, startTime *time.Time) ([]*models.Event, error)
	GetEventsCountByOwnerStartDateEndDate(ctx context.Context, owner string, startTime, endTime *time.Time) (int, error)
	DeleteEventByIdOwner(ctx context.Context, id, owner string) error
	DeleteEventsOlderDateByIdOwner(ctx context.Context, date *time.Time, owner string) (int64, error)
	UpdateEventByIdOwner(ctx context.Context, id string, event *models.Event) error
	MarkEventNotified(ctx context.Context, id string) error
	Close(ctx context.Context)
}

type TaskQueue added in v0.0.6

type TaskQueue interface {
	DeclareQueue(ctx context.Context, qName string, durable bool) error
	BindQueue(ctx context.Context, qName, routingKey, exchange string, durable bool) error
	DeclareExchange(ctx context.Context, name, kind string, durable bool) error
	SetQos(ctx context.Context, prefetchCount, prefetchSize int, global bool) error
	SendTaskToQueue(ctx context.Context, qName, exchange string, event *models.Event) error
	ConsumeTasksFromQueue(ctx context.Context, qName, consumer string, autoAck bool, task func(ctx context.Context, event *models.Event) error) error
}

Jump to

Keyboard shortcuts

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