Documentation ¶
Index ¶
- func PrepareProvideMessage(identity *ed25519.KeyPairEd25519, hash *encoding.Multihash, ...) []byte
- type NodeDetailsStorage
- type NodeStorage
- type ProviderStore
- type SignedStorageLocation
- type SignedStorageLocationImpl
- type StorageLocation
- type StorageLocationImpl
- func (s *StorageLocationImpl) BinaryParts() [][]byte
- func (s *StorageLocationImpl) BytesURL() string
- func (s *StorageLocationImpl) Expiry() int64
- func (s *StorageLocationImpl) OutboardBytesURL() string
- func (s *StorageLocationImpl) Parts() []string
- func (s *StorageLocationImpl) ProviderMessage() []byte
- func (s *StorageLocationImpl) SetBinaryParts(bp [][]byte)
- func (s *StorageLocationImpl) SetExpiry(e int64)
- func (s *StorageLocationImpl) SetParts(p []string)
- func (s *StorageLocationImpl) SetProviderMessage(msg []byte)
- func (s *StorageLocationImpl) SetType(t int)
- func (s *StorageLocationImpl) String() string
- func (s *StorageLocationImpl) Type() int
- type StorageLocationMap
- type StorageLocationProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareProvideMessage ¶
func PrepareProvideMessage(identity *ed25519.KeyPairEd25519, hash *encoding.Multihash, location StorageLocation) []byte
Types ¶
type NodeDetailsStorage ¶
type NodeDetailsStorage map[int]interface{}
type NodeStorage ¶
type NodeStorage map[string]NodeDetailsStorage
type ProviderStore ¶
type ProviderStore interface { CanProvide(hash *encoding.Multihash, kind []types.StorageLocationType) bool Provide(hash *encoding.Multihash, kind []types.StorageLocationType) (StorageLocation, error) }
type SignedStorageLocation ¶
type SignedStorageLocation interface { String() string NodeId() *encoding.NodeId Location() StorageLocation }
func NewSignedStorageLocation ¶
func NewSignedStorageLocation(NodeID *encoding.NodeId, Location StorageLocation) SignedStorageLocation
type SignedStorageLocationImpl ¶
type SignedStorageLocationImpl struct {
// contains filtered or unexported fields
}
func (*SignedStorageLocationImpl) Location ¶
func (ssl *SignedStorageLocationImpl) Location() StorageLocation
func (*SignedStorageLocationImpl) NodeId ¶
func (ssl *SignedStorageLocationImpl) NodeId() *encoding.NodeId
func (*SignedStorageLocationImpl) String ¶
func (ssl *SignedStorageLocationImpl) String() string
type StorageLocation ¶
type StorageLocation interface { BytesURL() string OutboardBytesURL() string String() string ProviderMessage() []byte Type() int Parts() []string BinaryParts() [][]byte Expiry() int64 SetProviderMessage(msg []byte) SetType(t int) SetParts(p []string) SetBinaryParts(bp [][]byte) SetExpiry(e int64) }
func NewStorageLocation ¶
func NewStorageLocation(Type int, Parts []string, Expiry int64) StorageLocation
type StorageLocationImpl ¶
type StorageLocationImpl struct {
// contains filtered or unexported fields
}
func (*StorageLocationImpl) BinaryParts ¶
func (s *StorageLocationImpl) BinaryParts() [][]byte
func (*StorageLocationImpl) BytesURL ¶
func (s *StorageLocationImpl) BytesURL() string
func (*StorageLocationImpl) Expiry ¶
func (s *StorageLocationImpl) Expiry() int64
func (*StorageLocationImpl) OutboardBytesURL ¶
func (s *StorageLocationImpl) OutboardBytesURL() string
func (*StorageLocationImpl) Parts ¶
func (s *StorageLocationImpl) Parts() []string
func (*StorageLocationImpl) ProviderMessage ¶
func (s *StorageLocationImpl) ProviderMessage() []byte
func (*StorageLocationImpl) SetBinaryParts ¶
func (s *StorageLocationImpl) SetBinaryParts(bp [][]byte)
func (*StorageLocationImpl) SetExpiry ¶
func (s *StorageLocationImpl) SetExpiry(e int64)
func (*StorageLocationImpl) SetParts ¶
func (s *StorageLocationImpl) SetParts(p []string)
func (*StorageLocationImpl) SetProviderMessage ¶
func (s *StorageLocationImpl) SetProviderMessage(msg []byte)
func (*StorageLocationImpl) SetType ¶
func (s *StorageLocationImpl) SetType(t int)
func (*StorageLocationImpl) String ¶
func (s *StorageLocationImpl) String() string
func (*StorageLocationImpl) Type ¶
func (s *StorageLocationImpl) Type() int
type StorageLocationMap ¶
type StorageLocationMap map[int]NodeStorage
func NewStorageLocationMap ¶
func NewStorageLocationMap() StorageLocationMap
func (*StorageLocationMap) DecodeMsgpack ¶
func (s *StorageLocationMap) DecodeMsgpack(dec *msgpack.Decoder) error
func (StorageLocationMap) EncodeMsgpack ¶
func (s StorageLocationMap) EncodeMsgpack(enc *msgpack.Encoder) error
type StorageLocationProvider ¶
type StorageLocationProvider interface { Start() error Next() (SignedStorageLocation, error) All() ([]SignedStorageLocation, error) Upvote(uri SignedStorageLocation) error Downvote(uri SignedStorageLocation) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.