model

package
v0.0.0-...-9563733 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNonceReused = errors.New("nonce reused")

ErrNonceReused may be returned by [NonceChecker.CheckNonce].

Functions

This section is empty.

Types

type Inventory

type Inventory interface {
	GetModule(ctx Context, pri principal.ID, key string, buf proto.Message) (found bool, err error)
	PutModule(ctx Context, pri principal.ID, key string, buf proto.Message) error
	UpdateModule(ctx Context, pri principal.ID, key string, buf proto.Message) error
	RemoveModule(ctx Context, pri principal.ID, key string) error

	GetInstance(ctx Context, pri principal.ID, key string, buf proto.Message) (found bool, err error)
	PutInstance(ctx Context, pri principal.ID, key string, buf proto.Message) error
	UpdateInstance(ctx Context, pri principal.ID, key string, buf proto.Message) error
	RemoveInstance(ctx Context, pri principal.ID, key string) error
}

type NonceChecker

type NonceChecker interface {
	CheckNonce(ctx Context, scope []byte, nonce string, expires time.Time) error
}

type SourceCache

type SourceCache interface {
	GetSourceSHA256(ctx Context, uri string) (hash string, err error)
	PutSourceSHA256(ctx Context, uri, hash string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳