repository

package
v0.0.0-...-2f6ec98 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Used to track random generated numbers used in hashcash.Stamps to prevent replay attacks

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIndicatorNotFound = errors.New("indicator not existing in inmemry db")
)

Functions

This section is empty.

Types

type Repository

type Repository interface {
	AddIndicator(ctx context.Context, indicator int64) error
	GetIndicator(ctx context.Context, indicator int64) (int64, error)
	RemoveIndicator(ctx context.Context, indicator int64)
}

func NewInMemoryDB

func NewInMemoryDB() Repository

NewInMemoryDB ..

Jump to

Keyboard shortcuts

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