store

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerConfiguration

type BadgerConfiguration struct {
	Dir string `toml:"dir"`
}

type BadgerStorage

type BadgerStorage struct {
	// contains filtered or unexported fields
}

func OpenBadger

func OpenBadger(ctx context.Context, conf *BadgerConfiguration) (*BadgerStorage, error)

func (*BadgerStorage) CheckEphemeralNonce

func (bs *BadgerStorage) CheckEphemeralNonce(key, ephemeral []byte, nonce uint64, grace time.Duration) (bool, error)

func (*BadgerStorage) CheckLimit

func (bs *BadgerStorage) CheckLimit(key []byte, window time.Duration, quota uint32, increase bool) (int, error)

func (*BadgerStorage) CheckPolyGroup

func (bs *BadgerStorage) CheckPolyGroup(group []byte) (bool, error)

func (*BadgerStorage) Close

func (bs *BadgerStorage) Close()

func (*BadgerStorage) ReadAssignee

func (bs *BadgerStorage) ReadAssignee(key []byte) ([]byte, error)

func (*BadgerStorage) ReadAssignor

func (bs *BadgerStorage) ReadAssignor(key []byte) ([]byte, error)

func (*BadgerStorage) ReadPolyPublic

func (bs *BadgerStorage) ReadPolyPublic() ([]byte, error)

func (*BadgerStorage) ReadPolyShare

func (bs *BadgerStorage) ReadPolyShare() ([]byte, error)

func (*BadgerStorage) RotateEphemeralNonce

func (bs *BadgerStorage) RotateEphemeralNonce(key, ephemeral []byte, nonce uint64) error

func (*BadgerStorage) Watch

func (bs *BadgerStorage) Watch(key []byte) ([]byte, time.Time, int, error)

func (*BadgerStorage) WriteAssignee

func (bs *BadgerStorage) WriteAssignee(key []byte, assignee []byte) error

func (*BadgerStorage) WritePoly

func (bs *BadgerStorage) WritePoly(public, share []byte) error

func (*BadgerStorage) WriteSignRequest

func (bs *BadgerStorage) WriteSignRequest(assignor, watcher []byte) (time.Time, int, error)

type Storage

type Storage interface {
	CheckPolyGroup(group []byte) (bool, error)
	ReadPolyPublic() ([]byte, error)
	ReadPolyShare() ([]byte, error)
	WritePoly(public, share []byte) error

	WriteAssignee(key []byte, assignee []byte) error
	ReadAssignor(key []byte) ([]byte, error)
	ReadAssignee(key []byte) ([]byte, error)
	CheckLimit(key []byte, window time.Duration, quota uint32, increase bool) (int, error)
	CheckEphemeralNonce(key, ephemeral []byte, nonce uint64, grace time.Duration) (bool, error)
	RotateEphemeralNonce(key, ephemeral []byte, nonce uint64) error
	WriteSignRequest(key, watcher []byte) (time.Time, int, error)
	Watch(key []byte) ([]byte, time.Time, int, error)
}

Jump to

Keyboard shortcuts

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