s3

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	ID   string       `json:"id"`
	Data []byte       `json:"data"`
	Kind DocumentKind `json:"kind"`
	Type DocumentType `json:"type"`
}

func NewPdfDocument

func NewPdfDocument(id string, data []byte, docType DocumentType) *Document

type DocumentKind

type DocumentKind string
const (
	DocumentKindPdf DocumentKind = "pdf"
)

type DocumentType

type DocumentType string
const (
	DocumentTypeInvoice DocumentType = "invoice"
)

type Service

type Service interface {
	UploadDocument(ctx context.Context, document *Document) error
	GetPresignedUrl(ctx context.Context, id string, docType DocumentType) (string, error)
	GetDocument(ctx context.Context, id string, docType DocumentType) ([]byte, error)
	Exists(ctx context.Context, id string, docType DocumentType) (bool, error)
}

func NewService

func NewService(config *config.Configuration) (Service, error)

Jump to

Keyboard shortcuts

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