Versions in this module Expand all Collapse all v0 v0.2.0 Jun 2, 2019 Changes in this version + const MinMessageSize + const SectorSize + var ErrRenterClosed = errors.New("renter has terminated session") + var RPCFormContractID = newSpecifier("LoopFormContract") + var RPCLockID = newSpecifier("LoopLock") + var RPCReadID = newSpecifier("LoopRead") + var RPCReadStop = newSpecifier("ReadStop") + var RPCRenewContractID = newSpecifier("LoopRenew") + var RPCSectorRootsID = newSpecifier("LoopSectorRoots") + var RPCSettingsID = newSpecifier("LoopSettings") + var RPCUnlockID = newSpecifier("LoopUnlock") + var RPCWriteActionAppend = newSpecifier("Append") + var RPCWriteActionSwap = newSpecifier("Swap") + var RPCWriteActionTrim = newSpecifier("Trim") + var RPCWriteActionUpdate = newSpecifier("Update") + var RPCWriteID = newSpecifier("LoopWrite") + type HashSigner interface + SignHash func(hash crypto.Hash) []byte + type HashVerifier interface + VerifyHash func(hash crypto.Hash, sig []byte) bool + type ProtocolObject interface + type RPCError struct + Data []byte + Description string + Type Specifier + func (e *RPCError) Error() string + type RPCFormContractAdditions struct + Inputs []types.SiacoinInput + Outputs []types.SiacoinOutput + Parents []types.Transaction + type RPCFormContractRequest struct + RenterKey types.SiaPublicKey + Transactions []types.Transaction + type RPCFormContractSignatures struct + ContractSignatures []types.TransactionSignature + RevisionSignature types.TransactionSignature + type RPCLockRequest struct + ContractID types.FileContractID + Signature []byte + Timeout uint64 + type RPCLockResponse struct + Acquired bool + NewChallenge [16]byte + Revision types.FileContractRevision + Signatures []types.TransactionSignature + type RPCReadRequest struct + MerkleProof bool + NewMissedProofValues []types.Currency + NewRevisionNumber uint64 + NewValidProofValues []types.Currency + Sections []RPCReadRequestSection + Signature []byte + type RPCReadRequestSection struct + Length uint32 + MerkleRoot crypto.Hash + Offset uint32 + type RPCReadResponse struct + Data []byte + MerkleProof []crypto.Hash + Signature []byte + type RPCSectorRootsRequest struct + NewMissedProofValues []types.Currency + NewRevisionNumber uint64 + NewValidProofValues []types.Currency + NumRoots uint64 + RootOffset uint64 + Signature []byte + type RPCSectorRootsResponse struct + MerkleProof []crypto.Hash + SectorRoots []crypto.Hash + Signature []byte + type RPCSettingsResponse struct + Settings []byte + type RPCWriteAction struct + A uint64 + B uint64 + Data []byte + Type Specifier + type RPCWriteMerkleProof struct + NewMerkleRoot crypto.Hash + OldLeafHashes []crypto.Hash + OldSubtreeHashes []crypto.Hash + type RPCWriteRequest struct + Actions []RPCWriteAction + MerkleProof bool + NewMissedProofValues []types.Currency + NewRevisionNumber uint64 + NewValidProofValues []types.Currency + type RPCWriteResponse struct + Signature []byte + type Session struct + func NewHostSession(conn io.ReadWriteCloser, hs HashSigner) (*Session, error) + func NewRenterSession(conn io.ReadWriteCloser, hv HashVerifier) (*Session, error) + func (s *Session) Close() error + func (s *Session) ReadID() (rpcID Specifier, err error) + func (s *Session) ReadRequest(req ProtocolObject, maxLen uint64) error + func (s *Session) ReadResponse(resp ProtocolObject, maxLen uint64) error + func (s *Session) SetChallenge(challenge [16]byte) + func (s *Session) SignChallenge(hs HashSigner) []byte + func (s *Session) VerifyChallenge(sig []byte, hv HashVerifier) bool + func (s *Session) WriteRequest(rpcID Specifier, req ProtocolObject) (err error) + func (s *Session) WriteResponse(resp ProtocolObject, err error) error + type Specifier [16]byte + func (s Specifier) String() string