store

package
v0.0.0-...-1bb7c6f Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package store is a package that contains the storage interface used by the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Save saves the given signature to storage
	Save(ctx context.Context, signature *models.Signature) (*models.Signature, error)

	// Get retrieves the signature with the given ID from storage
	Get(ctx context.Context, id uuid.UUID) (*models.Signature, error)

	// Update updates the signature with the given ID in storage
	Update(ctx context.Context, signature *models.Signature) (*models.Signature, error)

	// ChunkExists checks if the given chunk exists in storage
	ChunkExists(ctx context.Context, chunk models.Chunk) (bool, error)

	// GetSignatureForChunk retrieves the signature that contains the given chunk
	GetSignatureForChunk(ctx context.Context, chunk models.Chunk) (*models.Signature, error)

	// FileExists checks if the given file exists in storage
	FileExists(ctx context.Context, filename string) (bool, error)

	// GetSignatureForFilename retrieves the signature that contains the given file
	GetSignatureForFilename(ctx context.Context, filename string) (*models.Signature, error)
}

Directories

Path Synopsis
Package memory implements the storage interface for the memory storage
Package memory implements the storage interface for the memory storage

Jump to

Keyboard shortcuts

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