task

package
v0.0.0-...-2dc66f2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package task is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDebtTaskHandler

func RegisterDebtTaskHandler(handler *asynq.ServeMux, l logger.Interface, b sse.INotify)

func RegisterMailTaskHandler

func RegisterMailTaskHandler(handler *asynq.ServeMux, l logger.Interface, host, user, password, sender string, port int)

func RegisterTask

func RegisterTask(handler *asynq.ServeMux, l logger.Interface, host, user, password, sender string, port int, b sse.INotify)

Types

type DebtNotifyPayload

type DebtNotifyPayload struct {
	ID     uuid.UUID
	UserID uuid.UUID
	Event  string
}

type DebtTaskExecutor

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

func (*DebtTaskExecutor) ExecuteTask

func (s *DebtTaskExecutor) ExecuteTask(ctx context.Context, pl *DebtNotifyPayload) error

type EmailTaskExecutor

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

func (*EmailTaskExecutor) ExecuteTask

func (s *EmailTaskExecutor) ExecuteTask(ctx context.Context, pl *mail.EmailPayload) error

type IExecuteTask

type IExecuteTask[T any] interface {
	ExecuteTask(context.Context, T) error
}

func GetDebtTaskExecutor

func GetDebtTaskExecutor(c *asynq.Client) IExecuteTask[*DebtNotifyPayload]

func GetEmailTaskExecutor

func GetEmailTaskExecutor(c *asynq.Client) IExecuteTask[*mail.EmailPayload]

type MockIExecuteTask

type MockIExecuteTask[Template any] struct {
	// contains filtered or unexported fields
}

MockIExecuteTask is a mock of IExecuteTask interface.

func NewMockIExecuteTask

func NewMockIExecuteTask[Template any](ctrl *gomock.Controller) *MockIExecuteTask[Template]

NewMockIExecuteTask creates a new mock instance.

func (*MockIExecuteTask[Template]) EXPECT

func (m *MockIExecuteTask[Template]) EXPECT() *MockIExecuteTaskMockRecorder[Template]

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIExecuteTask[Template]) ExecuteTask

func (m *MockIExecuteTask[Template]) ExecuteTask(arg0 context.Context, arg1 Template) error

ExecuteTask mocks base method.

type MockIExecuteTaskMockRecorder

type MockIExecuteTaskMockRecorder[Template any] struct {
	// contains filtered or unexported fields
}

MockIExecuteTaskMockRecorder is the mock recorder for MockIExecuteTask.

func (*MockIExecuteTaskMockRecorder[Template]) ExecuteTask

func (mr *MockIExecuteTaskMockRecorder[Template]) ExecuteTask(arg0, arg1 interface{}) *gomock.Call

ExecuteTask indicates an expected call of ExecuteTask.

type TaskHandler

type TaskHandler = func(context.Context, *asynq.Task) error

Jump to

Keyboard shortcuts

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