Documentation ¶
Index ¶
- Constants
- type ArchiveService
- type DiskStorage
- func (s *DiskStorage) Check(ctx context.Context) (string, error)
- func (s *DiskStorage) CopyFolder(ctx context.Context, source storage.Locatable, dest storage.Locatable) error
- func (s *DiskStorage) Delete(resource storage.Locatable) error
- func (s *DiskStorage) ForEach(ctx context.Context, keyed storage.Keyed, forEachFn storage.ForEachFunc) error
- func (s *DiskStorage) Get(ctx context.Context, resource storage.Locatable) (resourceWithData *storage.GenericResource, err error)
- func (s *DiskStorage) Locate(resource storage.Locatable) string
- func (s *DiskStorage) ModTime(resource storage.KeyedResource) (time.Time, error)
- func (s *DiskStorage) NumberOfElements(ctx context.Context) (int, error)
- func (s *DiskStorage) Write(resource storage.KeyedResource) (err error)
- type ImageService
- type RecordDirectory
Constants ¶
View Source
const PDFFileExtension = "pdf"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveService ¶
type ArchiveService struct {
*DiskStorage
}
func NewArchiveService ¶
func NewArchiveService(directory string) (*ArchiveService, error)
func (*ArchiveService) Get ¶
func (f *ArchiveService) Get(ctx context.Context, id string) (storage.KeyedResource, error)
func (*ArchiveService) Set ¶
func (f *ArchiveService) Set(resource storage.KeyedResource) error
type DiskStorage ¶
type DiskStorage struct { Root string // contains filtered or unexported fields }
func NewDiskStorage ¶
func NewDiskStorage(directory string) (*DiskStorage, error)
NewDiskStorage creates and initializes Storage on the local filesystem using the provided directory as the root.
func (*DiskStorage) Check ¶
func (s *DiskStorage) Check(ctx context.Context) (string, error)
Check returns the health status of the file system.
func (*DiskStorage) CopyFolder ¶
func (*DiskStorage) Delete ¶
func (s *DiskStorage) Delete(resource storage.Locatable) error
Delete deletes the specified Locatable from the file system.
func (*DiskStorage) ForEach ¶
func (s *DiskStorage) ForEach(ctx context.Context, keyed storage.Keyed, forEachFn storage.ForEachFunc) error
ForEach executes the provided function for each stored element.
func (*DiskStorage) Get ¶
func (s *DiskStorage) Get(ctx context.Context, resource storage.Locatable) (resourceWithData *storage.GenericResource, err error)
Get retrieves a copy of the specified resource from the file system.
func (*DiskStorage) Locate ¶
func (s *DiskStorage) Locate(resource storage.Locatable) string
Locate returns the location of the specified Locatable.
func (*DiskStorage) ModTime ¶
func (s *DiskStorage) ModTime(resource storage.KeyedResource) (time.Time, error)
ModTime returns the time at which the element was last changed.
func (*DiskStorage) NumberOfElements ¶
func (s *DiskStorage) NumberOfElements(ctx context.Context) (int, error)
func (*DiskStorage) Write ¶
func (s *DiskStorage) Write(resource storage.KeyedResource) (err error)
Write writes the specified resource to the file system. It creates the files if it does not exist yet.
type ImageService ¶
type ImageService struct { *DiskStorage // contains filtered or unexported fields }
func NewImageService ¶
func NewImageService(directory string) (*ImageService, error)
func (*ImageService) GetByRecordId ¶
type RecordDirectory ¶
type RecordDirectory struct {
// contains filtered or unexported fields
}
func (RecordDirectory) Key ¶
func (dir RecordDirectory) Key() []string
Click to show internal directories.
Click to hide internal directories.