Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrContentNotFound = fmt.Errorf("content not found")
View Source
var MaxDistance = uint256.MustFromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
Functions ¶
This section is empty.
Types ¶
type ContentKey ¶
type ContentKey struct {
// contains filtered or unexported fields
}
func NewContentKey ¶
func NewContentKey(selector ContentType, data []byte) *ContentKey
func (*ContentKey) Encode ¶
func (c *ContentKey) Encode() []byte
type ContentStorage ¶
type ContentStorage interface { Get(contentKey []byte, contentId []byte) ([]byte, error) Put(contentKey []byte, contentId []byte, content []byte) error Radius() *uint256.Int }
func NewMockStorage ¶
func NewMockStorage() ContentStorage
type ContentType ¶
type ContentType byte
type MockStorage ¶
func (*MockStorage) Get ¶
func (m *MockStorage) Get(contentKey []byte, contentId []byte) ([]byte, error)
func (*MockStorage) Put ¶
func (m *MockStorage) Put(contentKey []byte, contentId []byte, content []byte) error
func (*MockStorage) Radius ¶
func (m *MockStorage) Radius() *uint256.Int
Click to show internal directories.
Click to hide internal directories.