Documentation ¶
Overview ¶
Package memory implements the storage interface for the memory storage
Index ¶
- type Storage
- func (s *Storage) ChunkExists(ctx context.Context, chunk models.Chunk) (bool, error)
- func (s *Storage) FileExists(ctx context.Context, filename string) (bool, error)
- func (s *Storage) Get(ctx context.Context, id uuid.UUID) (*models.Signature, error)
- func (s *Storage) GetSignatureForChunk(ctx context.Context, chunk models.Chunk) (*models.Signature, error)
- func (s *Storage) GetSignatureForFilename(ctx context.Context, filename string) (*models.Signature, error)
- func (s *Storage) Save(ctx context.Context, signature *models.Signature) (*models.Signature, error)
- func (s *Storage) Update(ctx context.Context, signature *models.Signature) (*models.Signature, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the memory storage implementation
func (*Storage) ChunkExists ¶
ChunkExists checks if a chunk exists
func (*Storage) FileExists ¶
FileExists checks if a file exists
func (*Storage) GetSignatureForChunk ¶
func (s *Storage) GetSignatureForChunk(ctx context.Context, chunk models.Chunk) (*models.Signature, error)
GetSignatureForChunk returns the signature that contains the given chunk
func (*Storage) GetSignatureForFilename ¶
func (s *Storage) GetSignatureForFilename(ctx context.Context, filename string) (*models.Signature, error)
GetSignatureForFilename returns the signature for the given file
Click to show internal directories.
Click to hide internal directories.