Documentation ¶
Index ¶
- type BadgerConfiguration
- type BadgerStorage
- func (bs *BadgerStorage) CheckEphemeralNonce(key, ephemeral []byte, nonce uint64, grace time.Duration) (bool, error)
- func (bs *BadgerStorage) CheckLimit(key []byte, window time.Duration, quota uint32, increase bool) (int, error)
- func (bs *BadgerStorage) CheckPolyGroup(group []byte) (bool, error)
- func (bs *BadgerStorage) Close()
- func (bs *BadgerStorage) ReadAssignee(key []byte) ([]byte, error)
- func (bs *BadgerStorage) ReadAssignor(key []byte) ([]byte, error)
- func (bs *BadgerStorage) ReadPolyPublic() ([]byte, error)
- func (bs *BadgerStorage) ReadPolyShare() ([]byte, error)
- func (bs *BadgerStorage) RotateEphemeralNonce(key, ephemeral []byte, nonce uint64) error
- func (bs *BadgerStorage) Watch(key []byte) ([]byte, time.Time, int, error)
- func (bs *BadgerStorage) WriteAssignee(key []byte, assignee []byte) error
- func (bs *BadgerStorage) WritePoly(public, share []byte) error
- func (bs *BadgerStorage) WriteSignRequest(assignor, watcher []byte) (time.Time, int, error)
- type Storage
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 (*BadgerStorage) CheckLimit ¶
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) WriteAssignee ¶
func (bs *BadgerStorage) WriteAssignee(key []byte, assignee []byte) error
func (*BadgerStorage) WritePoly ¶
func (bs *BadgerStorage) WritePoly(public, share []byte) error
func (*BadgerStorage) WriteSignRequest ¶
type Storage ¶
type Storage interface { CheckPolyGroup(group []byte) (bool, error) ReadPolyPublic() ([]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) }
Click to show internal directories.
Click to hide internal directories.