idxvolume

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDXVolume

type IDXVolume struct {
	VolumeID   string
	Signatures []string
}

IDXVolume represents the index of where copies are stored of the files in other volumes, this also stores replicas stored on this volume

func New

func New(k string, v []string) *IDXVolume

New returns a new IDXVolume with te Key and Value provided

func (*IDXVolume) AddSignature

func (idxv *IDXVolume) AddSignature(sig string)

AddSignature adds a new sig to the list of Signatures if the sig is already present it'll do nothing

type Repository

type Repository interface {
	CreateOrReplace(ctx context.Context, ik *IDXVolume) error
	FindByVolumeID(ctx context.Context, volumeID string) (*IDXVolume, error)
	DeleteByKey(ctx context.Context, volumeID string) error
	DeleteAll(ctx context.Context) error
}

Repository is the interface that has to be fulfiled to interact with IDXVolume

Jump to

Keyboard shortcuts

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