service

package
v0.0.0-...-d3b06f9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UploadService

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

You could have an interface for services but in this case I implemented without it

func NewUploadService

func NewUploadService(gp bot.Processor, db db.Databaser, store store.Storer) *UploadService

func (*UploadService) CreateDocument

func (s *UploadService) CreateDocument(ctx context.Context, document *types.Document) error

func (*UploadService) Get

func (s *UploadService) Get(ctx context.Context, fileName string) (io.Reader, error)

func (*UploadService) GetDocument

func (s *UploadService) GetDocument(ctx context.Context, id uuid.UUID) (types.Document, error)

func (*UploadService) Process

func (s *UploadService) Process(ctx context.Context, file *types.File) ([]byte, error)

func (*UploadService) Save

func (s *UploadService) Save(ctx context.Context, fileName string, file io.Reader) error

Jump to

Keyboard shortcuts

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