Documentation
¶
Overview ¶
Package pbd is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterDepotHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDepotHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DepotClient) error
- func RegisterDepotHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDepotHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DepotServer) error
- func RegisterDepotServer(s *grpc.Server, srv DepotServer)
- type BitSet
- type Block
- type Chunk
- func (*Chunk) Descriptor() ([]byte, []int)deprecated
- func (x *Chunk) GetBlocks() []*Block
- func (x *Chunk) GetHash() []byte
- func (x *Chunk) GetIndex() uint32
- func (x *Chunk) GetProof() [][]byte
- func (x *Chunk) GetTxHash() []byte
- func (*Chunk) ProtoMessage()
- func (x *Chunk) ProtoReflect() protoreflect.Message
- func (x *Chunk) Reset()
- func (x *Chunk) String() string
- type DepotClient
- type DepotServer
- type DownloadChunkRequest
- func (*DownloadChunkRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadChunkRequest) GetCommitTxHash() []byte
- func (x *DownloadChunkRequest) GetHash() []byte
- func (x *DownloadChunkRequest) GetIndex() uint32
- func (*DownloadChunkRequest) ProtoMessage()
- func (x *DownloadChunkRequest) ProtoReflect() protoreflect.Message
- func (x *DownloadChunkRequest) Reset()
- func (x *DownloadChunkRequest) String() string
- type DownloadChunkResponse
- func (*DownloadChunkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadChunkResponse) GetChunk() *Chunk
- func (*DownloadChunkResponse) ProtoMessage()
- func (x *DownloadChunkResponse) ProtoReflect() protoreflect.Message
- func (x *DownloadChunkResponse) Reset()
- func (x *DownloadChunkResponse) String() string
- type ObjectStatus
- func (ObjectStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ObjectStatus) Enum() *ObjectStatus
- func (ObjectStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ObjectStatus) Number() protoreflect.EnumNumber
- func (x ObjectStatus) String() string
- func (ObjectStatus) Type() protoreflect.EnumType
- type ObjectStatusRequest
- func (*ObjectStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectStatusRequest) GetCommitTxHash() []byte
- func (x *ObjectStatusRequest) GetHash() []byte
- func (*ObjectStatusRequest) ProtoMessage()
- func (x *ObjectStatusRequest) ProtoReflect() protoreflect.Message
- func (x *ObjectStatusRequest) Reset()
- func (x *ObjectStatusRequest) String() string
- type ObjectStatusResponse
- func (*ObjectStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectStatusResponse) GetAuditor() []byte
- func (x *ObjectStatusResponse) GetBlocksPerChunk() uint32
- func (x *ObjectStatusResponse) GetCid() []byte
- func (x *ObjectStatusResponse) GetCommitTxHash() []byte
- func (x *ObjectStatusResponse) GetDecoder() []byte
- func (x *ObjectStatusResponse) GetEncodedHash() []byte
- func (x *ObjectStatusResponse) GetEncodedSize() uint64
- func (x *ObjectStatusResponse) GetHash() []byte
- func (x *ObjectStatusResponse) GetNumBlocks() uint32
- func (x *ObjectStatusResponse) GetNumChunks() uint32
- func (x *ObjectStatusResponse) GetOwner() []byte
- func (x *ObjectStatusResponse) GetReceived() *BitSet
- func (x *ObjectStatusResponse) GetSectorsPerBlock() uint32
- func (x *ObjectStatusResponse) GetSize() uint64
- func (x *ObjectStatusResponse) GetStatus() ObjectStatus
- func (*ObjectStatusResponse) ProtoMessage()
- func (x *ObjectStatusResponse) ProtoReflect() protoreflect.Message
- func (x *ObjectStatusResponse) Reset()
- func (x *ObjectStatusResponse) String() string
- type StateResponse
- func (*StateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StateResponse) GetDiscoveryId() []byte
- func (x *StateResponse) GetPublicKey() []byte
- func (*StateResponse) ProtoMessage()
- func (x *StateResponse) ProtoReflect() protoreflect.Message
- func (x *StateResponse) Reset()
- func (x *StateResponse) String() string
- type UnimplementedDepotServer
- func (*UnimplementedDepotServer) DownloadChunk(context.Context, *DownloadChunkRequest) (*DownloadChunkResponse, error)
- func (*UnimplementedDepotServer) GetVersion(context.Context, *emptypb.Empty) (*VersionResponse, error)
- func (*UnimplementedDepotServer) ObjectStatus(context.Context, *ObjectStatusRequest) (*ObjectStatusResponse, error)
- func (*UnimplementedDepotServer) State(context.Context, *emptypb.Empty) (*StateResponse, error)
- func (*UnimplementedDepotServer) UploadChunk(context.Context, *UploadChunkRequest) (*UploadChunkResponse, error)
- func (*UnimplementedDepotServer) UploadInit(context.Context, *UploadInitRequest) (*UploadInitResponse, error)
- type UploadChunkRequest
- func (*UploadChunkRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadChunkRequest) GetChunk() *Chunk
- func (*UploadChunkRequest) ProtoMessage()
- func (x *UploadChunkRequest) ProtoReflect() protoreflect.Message
- func (x *UploadChunkRequest) Reset()
- func (x *UploadChunkRequest) String() string
- type UploadChunkResponse
- func (*UploadChunkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UploadChunkResponse) GetReceivedChunks() uint32
- func (x *UploadChunkResponse) GetTxHash() []byte
- func (*UploadChunkResponse) ProtoMessage()
- func (x *UploadChunkResponse) ProtoReflect() protoreflect.Message
- func (x *UploadChunkResponse) Reset()
- func (x *UploadChunkResponse) String() string
- type UploadInitRequest
- func (*UploadInitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadInitRequest) GetFromSignature() []byte
- func (x *UploadInitRequest) GetInitiatorSignature() []byte
- func (x *UploadInitRequest) GetSignedTx() *consensus.SignedTransaction
- func (*UploadInitRequest) ProtoMessage()
- func (x *UploadInitRequest) ProtoReflect() protoreflect.Message
- func (x *UploadInitRequest) Reset()
- func (x *UploadInitRequest) String() string
- type UploadInitResponse
- func (*UploadInitResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UploadInitResponse) GetBlocksPerChunk() uint32
- func (x *UploadInitResponse) GetSectorsPerBlock() uint32
- func (*UploadInitResponse) ProtoMessage()
- func (x *UploadInitResponse) ProtoReflect() protoreflect.Message
- func (x *UploadInitResponse) Reset()
- func (x *UploadInitResponse) String() string
- type VersionResponse
Constants ¶
This section is empty.
Variables ¶
var ( ObjectStatus_name = map[int32]string{ 0: "UPLOAD_STATUS_INVALID", 1: "NOT_FOUND", 2: "WRITABLE", 3: "READABLE", } ObjectStatus_value = map[string]int32{ "UPLOAD_STATUS_INVALID": 0, "NOT_FOUND": 1, "WRITABLE": 2, "READABLE": 3, } )
Enum value maps for ObjectStatus.
var File_depot_depot_proto protoreflect.FileDescriptor
var File_depot_object_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDepotHandler ¶
RegisterDepotHandler registers the http handlers for service Depot to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDepotHandlerClient ¶
func RegisterDepotHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DepotClient) error
RegisterDepotHandlerClient registers the http handlers for service Depot to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DepotClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DepotClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DepotClient" to call the correct interceptors.
func RegisterDepotHandlerFromEndpoint ¶
func RegisterDepotHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDepotHandlerFromEndpoint is same as RegisterDepotHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDepotHandlerServer ¶
func RegisterDepotHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DepotServer) error
RegisterDepotHandlerServer registers the http handlers for service Depot to "mux". UnaryRPC :call DepotServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDepotHandlerFromEndpoint instead.
func RegisterDepotServer ¶
func RegisterDepotServer(s *grpc.Server, srv DepotServer)
Types ¶
type BitSet ¶
type BitSet struct { // Number of valid bits in the byte array. Len uint32 `protobuf:"varint,1,opt,name=len,proto3" json:"len,omitempty"` // Bitvector byte array. Vec []uint64 `protobuf:"varint,2,rep,packed,name=vec,proto3" json:"vec,omitempty"` // contains filtered or unexported fields }
BitSet presents a bit vector.
func (*BitSet) Descriptor
deprecated
func (*BitSet) ProtoMessage ¶
func (*BitSet) ProtoMessage()
func (*BitSet) ProtoReflect ¶
func (x *BitSet) ProtoReflect() protoreflect.Message
type Block ¶
type Block struct { // Global block index in object scope. Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // For the initial updater, the block data contains client's original // data intended for storage. After a successful auditing event, data // becomes "transcoded", which requires a decoding before usage. (e.g. // Merkle root hash calculation). Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Por signature for block. Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
Block is the unit for storage and proof of retrievability verification.
func (*Block) Descriptor
deprecated
func (*Block) GetSignature ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type Chunk ¶
type Chunk struct { // For chunk upload, this tx hash is the associated tx hash, meaning it is // the commit tx hash for init upload and audit tx hash for audit upload. // For chunk download, this tx hash is always the init commit tx hash. TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // The Merkle tree root hash of the data before transcoding // (i.e. orginal data). Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // Chunk index within the object chunk array for identification purpose. Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` // Blocks belong to this chunk. Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"` // Merkle proof of the chunk. Proof [][]byte `protobuf:"bytes,5,rep,name=proof,proto3" json:"proof,omitempty"` // contains filtered or unexported fields }
Chunk is a group of consecutive blocks that represent a slice of an object uploaded to a depot.
func (*Chunk) Descriptor
deprecated
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
func (*Chunk) ProtoReflect ¶
func (x *Chunk) ProtoReflect() protoreflect.Message
type DepotClient ¶
type DepotClient interface { // Inquery for depot state. // // The API is used for client to fetch depot state such as public key, // discovery ID, etc, which are needed for sealing the transaction. State(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StateResponse, error) // Inquiry for object status. // // The API is used for client to synchronize with Depot on the latest // object status. It can be used to synchronize progress when resuming // from a previous client/server failure. ObjectStatus(ctx context.Context, in *ObjectStatusRequest, opts ...grpc.CallOption) (*ObjectStatusResponse, error) // Initiate an object update. // // The request includes a signed transaction needs to be broadcasted by // the Depot upon successful data upload. The signed transaction contains // object storage requirement and fees proposed by the client. If the Depot // is willing to take the storage contract proposal, an ACCEPTED status is // returned and the client can proceed to update data chunks. Otherwise, // a REJECTED status is returned. UploadInit(ctx context.Context, in *UploadInitRequest, opts ...grpc.CallOption) (*UploadInitResponse, error) // Upload a data chunk for a previously initiated object upload. // // Besides the chunk data, the request also contains object hash, merkle // tree proof for verification purpose. Upon chunk acceptence, an ACCEPTED // status is returned. UploadChunk(ctx context.Context, in *UploadChunkRequest, opts ...grpc.CallOption) (*UploadChunkResponse, error) // Download a data chunk from a previously uploaded object. DownloadChunk(ctx context.Context, in *DownloadChunkRequest, opts ...grpc.CallOption) (*DownloadChunkResponse, error) // Retrieve information about the running Depot server. GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) }
DepotClient is the client API for Depot service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDepotClient ¶
func NewDepotClient(cc grpc.ClientConnInterface) DepotClient
type DepotServer ¶
type DepotServer interface { // Inquery for depot state. // // The API is used for client to fetch depot state such as public key, // discovery ID, etc, which are needed for sealing the transaction. State(context.Context, *emptypb.Empty) (*StateResponse, error) // Inquiry for object status. // // The API is used for client to synchronize with Depot on the latest // object status. It can be used to synchronize progress when resuming // from a previous client/server failure. ObjectStatus(context.Context, *ObjectStatusRequest) (*ObjectStatusResponse, error) // Initiate an object update. // // The request includes a signed transaction needs to be broadcasted by // the Depot upon successful data upload. The signed transaction contains // object storage requirement and fees proposed by the client. If the Depot // is willing to take the storage contract proposal, an ACCEPTED status is // returned and the client can proceed to update data chunks. Otherwise, // a REJECTED status is returned. UploadInit(context.Context, *UploadInitRequest) (*UploadInitResponse, error) // Upload a data chunk for a previously initiated object upload. // // Besides the chunk data, the request also contains object hash, merkle // tree proof for verification purpose. Upon chunk acceptence, an ACCEPTED // status is returned. UploadChunk(context.Context, *UploadChunkRequest) (*UploadChunkResponse, error) // Download a data chunk from a previously uploaded object. DownloadChunk(context.Context, *DownloadChunkRequest) (*DownloadChunkResponse, error) // Retrieve information about the running Depot server. GetVersion(context.Context, *emptypb.Empty) (*VersionResponse, error) }
DepotServer is the server API for Depot service.
type DownloadChunkRequest ¶
type DownloadChunkRequest struct { // The Merkle tree root hash of the original data. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Original object commit tx hash. CommitTxHash []byte `protobuf:"bytes,2,opt,name=commit_tx_hash,json=commitTxHash,proto3" json:"commit_tx_hash,omitempty"` // Chunk Index. Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
func (*DownloadChunkRequest) Descriptor
deprecated
func (*DownloadChunkRequest) Descriptor() ([]byte, []int)
Deprecated: Use DownloadChunkRequest.ProtoReflect.Descriptor instead.
func (*DownloadChunkRequest) GetCommitTxHash ¶
func (x *DownloadChunkRequest) GetCommitTxHash() []byte
func (*DownloadChunkRequest) GetHash ¶
func (x *DownloadChunkRequest) GetHash() []byte
func (*DownloadChunkRequest) GetIndex ¶
func (x *DownloadChunkRequest) GetIndex() uint32
func (*DownloadChunkRequest) ProtoMessage ¶
func (*DownloadChunkRequest) ProtoMessage()
func (*DownloadChunkRequest) ProtoReflect ¶
func (x *DownloadChunkRequest) ProtoReflect() protoreflect.Message
func (*DownloadChunkRequest) Reset ¶
func (x *DownloadChunkRequest) Reset()
func (*DownloadChunkRequest) String ¶
func (x *DownloadChunkRequest) String() string
type DownloadChunkResponse ¶
type DownloadChunkResponse struct { // Chunk data. Chunk *Chunk `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` // contains filtered or unexported fields }
func (*DownloadChunkResponse) Descriptor
deprecated
func (*DownloadChunkResponse) Descriptor() ([]byte, []int)
Deprecated: Use DownloadChunkResponse.ProtoReflect.Descriptor instead.
func (*DownloadChunkResponse) GetChunk ¶
func (x *DownloadChunkResponse) GetChunk() *Chunk
func (*DownloadChunkResponse) ProtoMessage ¶
func (*DownloadChunkResponse) ProtoMessage()
func (*DownloadChunkResponse) ProtoReflect ¶
func (x *DownloadChunkResponse) ProtoReflect() protoreflect.Message
func (*DownloadChunkResponse) Reset ¶
func (x *DownloadChunkResponse) Reset()
func (*DownloadChunkResponse) String ¶
func (x *DownloadChunkResponse) String() string
type ObjectStatus ¶
type ObjectStatus int32
const ( ObjectStatus_UPLOAD_STATUS_INVALID ObjectStatus = 0 // Object not found by the Depot. ObjectStatus_NOT_FOUND ObjectStatus = 1 // Object is still being uploaded. ObjectStatus_WRITABLE ObjectStatus = 2 // Object is received and can be retrieved. ObjectStatus_READABLE ObjectStatus = 3 )
func (ObjectStatus) Descriptor ¶
func (ObjectStatus) Descriptor() protoreflect.EnumDescriptor
func (ObjectStatus) Enum ¶
func (x ObjectStatus) Enum() *ObjectStatus
func (ObjectStatus) EnumDescriptor
deprecated
func (ObjectStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ObjectStatus.Descriptor instead.
func (ObjectStatus) Number ¶
func (x ObjectStatus) Number() protoreflect.EnumNumber
func (ObjectStatus) String ¶
func (x ObjectStatus) String() string
func (ObjectStatus) Type ¶
func (ObjectStatus) Type() protoreflect.EnumType
type ObjectStatusRequest ¶
type ObjectStatusRequest struct { // The Merkle tree root hash of the original data. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The original object commit tx hash. // If empty, all object versions are inquiried. CommitTxHash []byte `protobuf:"bytes,2,opt,name=commit_tx_hash,json=commitTxHash,proto3" json:"commit_tx_hash,omitempty"` // contains filtered or unexported fields }
func (*ObjectStatusRequest) Descriptor
deprecated
func (*ObjectStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use ObjectStatusRequest.ProtoReflect.Descriptor instead.
func (*ObjectStatusRequest) GetCommitTxHash ¶
func (x *ObjectStatusRequest) GetCommitTxHash() []byte
func (*ObjectStatusRequest) GetHash ¶
func (x *ObjectStatusRequest) GetHash() []byte
func (*ObjectStatusRequest) ProtoMessage ¶
func (*ObjectStatusRequest) ProtoMessage()
func (*ObjectStatusRequest) ProtoReflect ¶
func (x *ObjectStatusRequest) ProtoReflect() protoreflect.Message
func (*ObjectStatusRequest) Reset ¶
func (x *ObjectStatusRequest) Reset()
func (*ObjectStatusRequest) String ¶
func (x *ObjectStatusRequest) String() string
type ObjectStatusResponse ¶
type ObjectStatusResponse struct { // Object status. Status ObjectStatus `protobuf:"varint,1,opt,name=status,proto3,enum=photon.depot.ObjectStatus" json:"status,omitempty"` // Object's owner's publick key. Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` // Object's auditor's publick key. Auditor []byte `protobuf:"bytes,3,opt,name=auditor,proto3" json:"auditor,omitempty"` // The original object commit tx hash. CommitTxHash []byte `protobuf:"bytes,4,opt,name=commit_tx_hash,json=commitTxHash,proto3" json:"commit_tx_hash,omitempty"` // Object decoder defines how to decode object data. Decoder []byte `protobuf:"bytes,5,opt,name=decoder,proto3" json:"decoder,omitempty"` // The Merkle tree root hash of the original data. Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"` // Encoded object data hash. EncodedHash []byte `protobuf:"bytes,7,opt,name=encoded_hash,json=encodedHash,proto3" json:"encoded_hash,omitempty"` // Original data size. Size uint64 `protobuf:"varint,8,opt,name=size,proto3" json:"size,omitempty"` // Encoded data size. EncodedSize uint64 `protobuf:"varint,9,opt,name=encoded_size,json=encodedSize,proto3" json:"encoded_size,omitempty"` // Total number of blocks for the object. NumBlocks uint32 `protobuf:"varint,10,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` // Number of sectors per block. SectorsPerBlock uint32 `protobuf:"varint,11,opt,name=sectors_per_block,json=sectorsPerBlock,proto3" json:"sectors_per_block,omitempty"` // Number of sectors per block. BlocksPerChunk uint32 `protobuf:"varint,12,opt,name=blocks_per_chunk,json=blocksPerChunk,proto3" json:"blocks_per_chunk,omitempty"` // Total number of chunks for the objet. NumChunks uint32 `protobuf:"varint,13,opt,name=num_chunks,json=numChunks,proto3" json:"num_chunks,omitempty"` // optional IPFS CID if published. Cid []byte `protobuf:"bytes,14,opt,name=cid,proto3" json:"cid,omitempty"` // BitSet of chunks indicates availability in the Depot. // Only valid for an active upload. Received *BitSet `protobuf:"bytes,15,opt,name=received,proto3" json:"received,omitempty"` // contains filtered or unexported fields }
func (*ObjectStatusResponse) Descriptor
deprecated
func (*ObjectStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use ObjectStatusResponse.ProtoReflect.Descriptor instead.
func (*ObjectStatusResponse) GetAuditor ¶
func (x *ObjectStatusResponse) GetAuditor() []byte
func (*ObjectStatusResponse) GetBlocksPerChunk ¶
func (x *ObjectStatusResponse) GetBlocksPerChunk() uint32
func (*ObjectStatusResponse) GetCid ¶
func (x *ObjectStatusResponse) GetCid() []byte
func (*ObjectStatusResponse) GetCommitTxHash ¶
func (x *ObjectStatusResponse) GetCommitTxHash() []byte
func (*ObjectStatusResponse) GetDecoder ¶
func (x *ObjectStatusResponse) GetDecoder() []byte
func (*ObjectStatusResponse) GetEncodedHash ¶
func (x *ObjectStatusResponse) GetEncodedHash() []byte
func (*ObjectStatusResponse) GetEncodedSize ¶
func (x *ObjectStatusResponse) GetEncodedSize() uint64
func (*ObjectStatusResponse) GetHash ¶
func (x *ObjectStatusResponse) GetHash() []byte
func (*ObjectStatusResponse) GetNumBlocks ¶
func (x *ObjectStatusResponse) GetNumBlocks() uint32
func (*ObjectStatusResponse) GetNumChunks ¶
func (x *ObjectStatusResponse) GetNumChunks() uint32
func (*ObjectStatusResponse) GetOwner ¶
func (x *ObjectStatusResponse) GetOwner() []byte
func (*ObjectStatusResponse) GetReceived ¶
func (x *ObjectStatusResponse) GetReceived() *BitSet
func (*ObjectStatusResponse) GetSectorsPerBlock ¶
func (x *ObjectStatusResponse) GetSectorsPerBlock() uint32
func (*ObjectStatusResponse) GetSize ¶
func (x *ObjectStatusResponse) GetSize() uint64
func (*ObjectStatusResponse) GetStatus ¶
func (x *ObjectStatusResponse) GetStatus() ObjectStatus
func (*ObjectStatusResponse) ProtoMessage ¶
func (*ObjectStatusResponse) ProtoMessage()
func (*ObjectStatusResponse) ProtoReflect ¶
func (x *ObjectStatusResponse) ProtoReflect() protoreflect.Message
func (*ObjectStatusResponse) Reset ¶
func (x *ObjectStatusResponse) Reset()
func (*ObjectStatusResponse) String ¶
func (x *ObjectStatusResponse) String() string
type StateResponse ¶
type StateResponse struct { // Depot's publick key. PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Depot's discovery ID on the P2P network. DiscoveryId []byte `protobuf:"bytes,2,opt,name=discovery_id,json=discoveryId,proto3" json:"discovery_id,omitempty"` // contains filtered or unexported fields }
func (*StateResponse) Descriptor
deprecated
func (*StateResponse) Descriptor() ([]byte, []int)
Deprecated: Use StateResponse.ProtoReflect.Descriptor instead.
func (*StateResponse) GetDiscoveryId ¶
func (x *StateResponse) GetDiscoveryId() []byte
func (*StateResponse) GetPublicKey ¶
func (x *StateResponse) GetPublicKey() []byte
func (*StateResponse) ProtoMessage ¶
func (*StateResponse) ProtoMessage()
func (*StateResponse) ProtoReflect ¶
func (x *StateResponse) ProtoReflect() protoreflect.Message
func (*StateResponse) Reset ¶
func (x *StateResponse) Reset()
func (*StateResponse) String ¶
func (x *StateResponse) String() string
type UnimplementedDepotServer ¶
type UnimplementedDepotServer struct { }
UnimplementedDepotServer can be embedded to have forward compatible implementations.
func (*UnimplementedDepotServer) DownloadChunk ¶
func (*UnimplementedDepotServer) DownloadChunk(context.Context, *DownloadChunkRequest) (*DownloadChunkResponse, error)
func (*UnimplementedDepotServer) GetVersion ¶
func (*UnimplementedDepotServer) GetVersion(context.Context, *emptypb.Empty) (*VersionResponse, error)
func (*UnimplementedDepotServer) ObjectStatus ¶
func (*UnimplementedDepotServer) ObjectStatus(context.Context, *ObjectStatusRequest) (*ObjectStatusResponse, error)
func (*UnimplementedDepotServer) State ¶
func (*UnimplementedDepotServer) State(context.Context, *emptypb.Empty) (*StateResponse, error)
func (*UnimplementedDepotServer) UploadChunk ¶
func (*UnimplementedDepotServer) UploadChunk(context.Context, *UploadChunkRequest) (*UploadChunkResponse, error)
func (*UnimplementedDepotServer) UploadInit ¶
func (*UnimplementedDepotServer) UploadInit(context.Context, *UploadInitRequest) (*UploadInitResponse, error)
type UploadChunkRequest ¶
type UploadChunkRequest struct { // Chunk data. Chunk *Chunk `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` // contains filtered or unexported fields }
func (*UploadChunkRequest) Descriptor
deprecated
func (*UploadChunkRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadChunkRequest.ProtoReflect.Descriptor instead.
func (*UploadChunkRequest) GetChunk ¶
func (x *UploadChunkRequest) GetChunk() *Chunk
func (*UploadChunkRequest) ProtoMessage ¶
func (*UploadChunkRequest) ProtoMessage()
func (*UploadChunkRequest) ProtoReflect ¶
func (x *UploadChunkRequest) ProtoReflect() protoreflect.Message
func (*UploadChunkRequest) Reset ¶
func (x *UploadChunkRequest) Reset()
func (*UploadChunkRequest) String ¶
func (x *UploadChunkRequest) String() string
type UploadChunkResponse ¶
type UploadChunkResponse struct { // Number of chunks received and stored. ReceivedChunks uint32 `protobuf:"varint,1,opt,name=received_chunks,json=receivedChunks,proto3" json:"received_chunks,omitempty"` // If not empty, returns the tx hash just submitted on chain. TxHash []byte `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // contains filtered or unexported fields }
func (*UploadChunkResponse) Descriptor
deprecated
func (*UploadChunkResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadChunkResponse.ProtoReflect.Descriptor instead.
func (*UploadChunkResponse) GetReceivedChunks ¶
func (x *UploadChunkResponse) GetReceivedChunks() uint32
func (*UploadChunkResponse) GetTxHash ¶
func (x *UploadChunkResponse) GetTxHash() []byte
func (*UploadChunkResponse) ProtoMessage ¶
func (*UploadChunkResponse) ProtoMessage()
func (*UploadChunkResponse) ProtoReflect ¶
func (x *UploadChunkResponse) ProtoReflect() protoreflect.Message
func (*UploadChunkResponse) Reset ¶
func (x *UploadChunkResponse) Reset()
func (*UploadChunkResponse) String ¶
func (x *UploadChunkResponse) String() string
type UploadInitRequest ¶
type UploadInitRequest struct { // Proposed OBJECT_COMMIT/OBJECT_AUDIT transaction which contains storage // contract details. SignedTx *consensus.SignedTransaction `protobuf:"bytes,1,opt,name=signed_tx,json=signedTx,proto3" json:"signed_tx,omitempty"` // Tx signature signed by the TxDataObjectCommit.owner or // TxDataObjectAudit.auditor. InitiatorSignature []byte `protobuf:"bytes,2,opt,name=initiator_signature,json=initiatorSignature,proto3" json:"initiator_signature,omitempty"` // Tx signature signed by the Transaction.from. FromSignature []byte `protobuf:"bytes,3,opt,name=from_signature,json=fromSignature,proto3" json:"from_signature,omitempty"` // contains filtered or unexported fields }
func (*UploadInitRequest) Descriptor
deprecated
func (*UploadInitRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadInitRequest.ProtoReflect.Descriptor instead.
func (*UploadInitRequest) GetFromSignature ¶
func (x *UploadInitRequest) GetFromSignature() []byte
func (*UploadInitRequest) GetInitiatorSignature ¶
func (x *UploadInitRequest) GetInitiatorSignature() []byte
func (*UploadInitRequest) GetSignedTx ¶
func (x *UploadInitRequest) GetSignedTx() *consensus.SignedTransaction
func (*UploadInitRequest) ProtoMessage ¶
func (*UploadInitRequest) ProtoMessage()
func (*UploadInitRequest) ProtoReflect ¶
func (x *UploadInitRequest) ProtoReflect() protoreflect.Message
func (*UploadInitRequest) Reset ¶
func (x *UploadInitRequest) Reset()
func (*UploadInitRequest) String ¶
func (x *UploadInitRequest) String() string
type UploadInitResponse ¶
type UploadInitResponse struct { // Fixed number of sectors for each block. SectorsPerBlock uint32 `protobuf:"varint,1,opt,name=sectors_per_block,json=sectorsPerBlock,proto3" json:"sectors_per_block,omitempty"` // Fixed number of blocks for each uploaded chunk, except the last chunk // can have a smaller number. BlocksPerChunk uint32 `protobuf:"varint,2,opt,name=blocks_per_chunk,json=blocksPerChunk,proto3" json:"blocks_per_chunk,omitempty"` // contains filtered or unexported fields }
func (*UploadInitResponse) Descriptor
deprecated
func (*UploadInitResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadInitResponse.ProtoReflect.Descriptor instead.
func (*UploadInitResponse) GetBlocksPerChunk ¶
func (x *UploadInitResponse) GetBlocksPerChunk() uint32
func (*UploadInitResponse) GetSectorsPerBlock ¶
func (x *UploadInitResponse) GetSectorsPerBlock() uint32
func (*UploadInitResponse) ProtoMessage ¶
func (*UploadInitResponse) ProtoMessage()
func (*UploadInitResponse) ProtoReflect ¶
func (x *UploadInitResponse) ProtoReflect() protoreflect.Message
func (*UploadInitResponse) Reset ¶
func (x *UploadInitResponse) Reset()
func (*UploadInitResponse) String ¶
func (x *UploadInitResponse) String() string
type VersionResponse ¶
type VersionResponse struct { // A string about the depot version. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
Information about the depot version.
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetVersion ¶
func (x *VersionResponse) GetVersion() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string