documents

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 6 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 {
	DocumentID string       `json:"document_id"`
	Pdf        []byte       `json:"pdf,omitempty"`
	Ascii      []byte       `json:"ascii"`
	Created    sql.NullTime `json:"created_at,omitempty"`
	Deleted    sql.NullTime `json:"deleted_at"`
}

Document

type DocumentInformation

type DocumentInformation struct {
	DocumentID string
	File       file.File
	Metadata   map[string]string
}

DocumentInformation

type StorageService

type StorageService interface {
	Save(doc *DocumentInformation) error
	Get(id string) (*Document, error)
}

StorageService

func NewStorageService

func NewStorageService(db *sql.DB, encrypter encrypt.EncryptService) (StorageService, error)

NewStorageService

Jump to

Keyboard shortcuts

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