handlers

package
v0.0.0-...-aa737f3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentProcessor

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

func NewDocumentProcessor

func NewDocumentProcessor(store Store, s3 S3) *DocumentProcessor

func (*DocumentProcessor) ProcessTask

func (d *DocumentProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error

type S3

type S3 interface {
	GetObject(ctx context.Context, bucketName, filename string) (io.ReadCloser, error)
}

type Store

type Store interface {
	GetDocument(ctx context.Context, id int) (*ent.Document, error)
	SetDocumentContent(ctx context.Context, id int, content *string) (*ent.Document, error)
}

Jump to

Keyboard shortcuts

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