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 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)
// GeneratePresignedURL generates a presigned URL for any S3 object given bucket and key
GeneratePresignedURL(ctx context.Context, bucket, key string, duration time.Duration) (string, error)
}
func NewService ¶
func NewService(config *config.Configuration) (Service, error)
Click to show internal directories.
Click to hide internal directories.