Documentation ¶
Index ¶
- Variables
- type DB
- type Service
- func (s *Service) FetchStorageInfo(ctx context.Context, contractAddr *address.Address, byteToProof uint64) (*StorageInfo, error)
- func (s *Service) GetStorageInfo(bagSize uint64) (available bool, minSpan, maxSpan uint32, spaceAvailable uint64, ...)
- func (s *Service) RequestStorageADNLProof(ctx context.Context, contractAddr *address.Address) (ed25519.PublicKey, []byte, error)
- type Storage
- type StorageInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLowBalance = fmt.Errorf("storage denied, available balance should be at least 0.08 TON")
View Source
var ErrLowBounty = fmt.Errorf("bounty should be at least 0.05 TON to cover fees")
View Source
var ErrNoSpace = fmt.Errorf("not enough free space to store requested bag")
View Source
var ErrNotDeployed = fmt.Errorf("contract is not deployed")
View Source
var ErrTooBigBag = fmt.Errorf("too big bag")
View Source
var ErrTooLongSpan = fmt.Errorf("too long proof time")
View Source
var ErrTooLowRate = fmt.Errorf("too low rate per mb")
View Source
var ErrTooShortSpan = fmt.Errorf("too short proof time")
View Source
var ErrUnsupportedContract = fmt.Errorf("unsupported contract")
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) FetchStorageInfo ¶
func (*Service) GetStorageInfo ¶
type Storage ¶
type Storage interface { GetBag(ctx context.Context, bagId []byte) (*storage.BagDetailed, error) GetPieceProof(ctx context.Context, bagId []byte, piece uint64) ([]byte, error) StartDownload(ctx context.Context, bagId []byte, downloadAll bool) error RemoveBag(ctx context.Context, bagId []byte, withFiles bool) error ProofProvider(ctx context.Context) (ed25519.PublicKey, []byte, error) }
type StorageInfo ¶
Click to show internal directories.
Click to hide internal directories.