Documentation ¶
Index ¶
- Variables
- func RegisterGuardServiceServer(s *grpc.Server, srv GuardServiceServer)
- type ChallengeQuestion
- func (*ChallengeQuestion) Descriptor() ([]byte, []int)
- func (m *ChallengeQuestion) GetChunkIndex() int32
- func (m *ChallengeQuestion) GetExpectAnswer() string
- func (m *ChallengeQuestion) GetHostPid() string
- func (m *ChallengeQuestion) GetNonce() string
- func (m *ChallengeQuestion) GetShardHash() string
- func (m *ChallengeQuestion) Marshal() (dAtA []byte, err error)
- func (m *ChallengeQuestion) MarshalTo(dAtA []byte) (int, error)
- func (m *ChallengeQuestion) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ChallengeQuestion) ProtoMessage()
- func (m *ChallengeQuestion) Reset()
- func (m *ChallengeQuestion) Size() (n int)
- func (m *ChallengeQuestion) String() string
- func (m *ChallengeQuestion) Unmarshal(dAtA []byte) error
- func (m *ChallengeQuestion) XXX_DiscardUnknown()
- func (m *ChallengeQuestion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChallengeQuestion) XXX_Merge(src proto.Message)
- func (*ChallengeQuestion) XXX_MessageName() string
- func (m *ChallengeQuestion) XXX_Size() int
- func (m *ChallengeQuestion) XXX_Unmarshal(b []byte) error
- type CheckFileStoreMetaRequest
- func (*CheckFileStoreMetaRequest) Descriptor() ([]byte, []int)
- func (m *CheckFileStoreMetaRequest) GetFileHash() string
- func (m *CheckFileStoreMetaRequest) GetRenterPid() string
- func (m *CheckFileStoreMetaRequest) GetRequestTime() time.Time
- func (m *CheckFileStoreMetaRequest) GetRequesterPid() string
- func (m *CheckFileStoreMetaRequest) GetSignature() []byte
- func (m *CheckFileStoreMetaRequest) Marshal() (dAtA []byte, err error)
- func (m *CheckFileStoreMetaRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *CheckFileStoreMetaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CheckFileStoreMetaRequest) ProtoMessage()
- func (m *CheckFileStoreMetaRequest) Reset()
- func (m *CheckFileStoreMetaRequest) Size() (n int)
- func (m *CheckFileStoreMetaRequest) String() string
- func (m *CheckFileStoreMetaRequest) Unmarshal(dAtA []byte) error
- func (m *CheckFileStoreMetaRequest) XXX_DiscardUnknown()
- func (m *CheckFileStoreMetaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CheckFileStoreMetaRequest) XXX_Merge(src proto.Message)
- func (*CheckFileStoreMetaRequest) XXX_MessageName() string
- func (m *CheckFileStoreMetaRequest) XXX_Size() int
- func (m *CheckFileStoreMetaRequest) XXX_Unmarshal(b []byte) error
- type Contract
- func (*Contract) Descriptor() ([]byte, []int)
- func (m *Contract) GetChallengeSuccessTimes() int32
- func (m *Contract) GetChallengeTimes() int32
- func (m *Contract) GetChallengeWarnTimes() int32
- func (m *Contract) GetChangeLog() []*Log
- func (m *Contract) GetEscrowSignature() []byte
- func (m *Contract) GetEscrowSignedTime() time.Time
- func (m *Contract) GetGuardSignature() []byte
- func (m *Contract) GetHostSignature() []byte
- func (m *Contract) GetLastChallengeTime() time.Time
- func (m *Contract) GetLastModifyTime() time.Time
- func (m *Contract) GetLastSuccessChallengeTime() time.Time
- func (m *Contract) GetPreparerPid() string
- func (m *Contract) GetPreparerSignature() []byte
- func (m *Contract) GetRenterSignature() []byte
- func (m *Contract) GetState() Contract_ContractState
- func (m *Contract) Marshal() (dAtA []byte, err error)
- func (m *Contract) MarshalTo(dAtA []byte) (int, error)
- func (m *Contract) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Contract) ProtoMessage()
- func (m *Contract) Reset()
- func (m *Contract) Size() (n int)
- func (m *Contract) String() string
- func (m *Contract) Unmarshal(dAtA []byte) error
- func (m *Contract) XXX_DiscardUnknown()
- func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Contract) XXX_Merge(src proto.Message)
- func (*Contract) XXX_MessageName() string
- func (m *Contract) XXX_Size() int
- func (m *Contract) XXX_Unmarshal(b []byte) error
- type ContractMeta
- func (*ContractMeta) Descriptor() ([]byte, []int)
- func (m *ContractMeta) GetAmount() int64
- func (m *ContractMeta) GetCollateralAmount() int64
- func (m *ContractMeta) GetContractId() string
- func (m *ContractMeta) GetEscrowPid() string
- func (m *ContractMeta) GetFileHash() string
- func (m *ContractMeta) GetGuardPid() string
- func (m *ContractMeta) GetHostPid() string
- func (m *ContractMeta) GetNumPayouts() int32
- func (m *ContractMeta) GetPayoutSchedule() ContractMeta_Schedule
- func (m *ContractMeta) GetPrice() int64
- func (m *ContractMeta) GetRentEnd() time.Time
- func (m *ContractMeta) GetRentStart() time.Time
- func (m *ContractMeta) GetRenterPid() string
- func (m *ContractMeta) GetShardFileSize() int64
- func (m *ContractMeta) GetShardHash() string
- func (m *ContractMeta) GetShardIndex() int32
- func (m *ContractMeta) Marshal() (dAtA []byte, err error)
- func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error)
- func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ContractMeta) ProtoMessage()
- func (m *ContractMeta) Reset()
- func (m *ContractMeta) Size() (n int)
- func (m *ContractMeta) String() string
- func (m *ContractMeta) Unmarshal(dAtA []byte) error
- func (m *ContractMeta) XXX_DiscardUnknown()
- func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ContractMeta) XXX_Merge(src proto.Message)
- func (*ContractMeta) XXX_MessageName() string
- func (m *ContractMeta) XXX_Size() int
- func (m *ContractMeta) XXX_Unmarshal(b []byte) error
- type ContractMeta_Schedule
- type Contract_ContractState
- type FileChallengeQuestions
- func (*FileChallengeQuestions) Descriptor() ([]byte, []int)
- func (m *FileChallengeQuestions) GetFileHash() string
- func (m *FileChallengeQuestions) GetShardQuestions() []*ShardChallengeQuestions
- func (m *FileChallengeQuestions) Marshal() (dAtA []byte, err error)
- func (m *FileChallengeQuestions) MarshalTo(dAtA []byte) (int, error)
- func (m *FileChallengeQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FileChallengeQuestions) ProtoMessage()
- func (m *FileChallengeQuestions) Reset()
- func (m *FileChallengeQuestions) Size() (n int)
- func (m *FileChallengeQuestions) String() string
- func (m *FileChallengeQuestions) Unmarshal(dAtA []byte) error
- func (m *FileChallengeQuestions) XXX_DiscardUnknown()
- func (m *FileChallengeQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FileChallengeQuestions) XXX_Merge(src proto.Message)
- func (*FileChallengeQuestions) XXX_MessageName() string
- func (m *FileChallengeQuestions) XXX_Size() int
- func (m *FileChallengeQuestions) XXX_Unmarshal(b []byte) error
- type FileStoreMeta
- func (*FileStoreMeta) Descriptor() ([]byte, []int)
- func (m *FileStoreMeta) GetCheckFrequency() int32
- func (m *FileStoreMeta) GetCheckFrequencyWarn() int32
- func (m *FileStoreMeta) GetEscrowFee() int64
- func (m *FileStoreMeta) GetEscrowPid() string
- func (m *FileStoreMeta) GetFileHash() string
- func (m *FileStoreMeta) GetFileSize() int64
- func (m *FileStoreMeta) GetGuardFee() int64
- func (m *FileStoreMeta) GetGuardPid() string
- func (m *FileStoreMeta) GetMinimumShards() int32
- func (m *FileStoreMeta) GetRecoverThreshold() int32
- func (m *FileStoreMeta) GetRentEnd() time.Time
- func (m *FileStoreMeta) GetRentStart() time.Time
- func (m *FileStoreMeta) GetRenterPid() string
- func (m *FileStoreMeta) GetShardCount() int32
- func (m *FileStoreMeta) GetSuccessChallengeTimesLimit() int32
- func (m *FileStoreMeta) GetWarnChallengeTimesLimit() int32
- func (m *FileStoreMeta) Marshal() (dAtA []byte, err error)
- func (m *FileStoreMeta) MarshalTo(dAtA []byte) (int, error)
- func (m *FileStoreMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FileStoreMeta) ProtoMessage()
- func (m *FileStoreMeta) Reset()
- func (m *FileStoreMeta) Size() (n int)
- func (m *FileStoreMeta) String() string
- func (m *FileStoreMeta) Unmarshal(dAtA []byte) error
- func (m *FileStoreMeta) XXX_DiscardUnknown()
- func (m *FileStoreMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FileStoreMeta) XXX_Merge(src proto.Message)
- func (*FileStoreMeta) XXX_MessageName() string
- func (m *FileStoreMeta) XXX_Size() int
- func (m *FileStoreMeta) XXX_Unmarshal(b []byte) error
- type FileStoreStatus
- func (*FileStoreStatus) Descriptor() ([]byte, []int)
- func (m *FileStoreStatus) GetChangeLog() []*Log
- func (m *FileStoreStatus) GetContracts() []*Contract
- func (m *FileStoreStatus) GetCurrentTime() time.Time
- func (m *FileStoreStatus) GetGuardReceiveTime() time.Time
- func (m *FileStoreStatus) GetGuardSignature() []byte
- func (m *FileStoreStatus) GetPreparerPid() string
- func (m *FileStoreStatus) GetPreparerSignature() []byte
- func (m *FileStoreStatus) GetRentalState() FileStoreStatus_RentalState
- func (m *FileStoreStatus) GetRenterSignature() []byte
- func (m *FileStoreStatus) GetState() FileStoreStatus_MetaState
- func (m *FileStoreStatus) Marshal() (dAtA []byte, err error)
- func (m *FileStoreStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *FileStoreStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FileStoreStatus) ProtoMessage()
- func (m *FileStoreStatus) Reset()
- func (m *FileStoreStatus) Size() (n int)
- func (m *FileStoreStatus) String() string
- func (m *FileStoreStatus) Unmarshal(dAtA []byte) error
- func (m *FileStoreStatus) XXX_DiscardUnknown()
- func (m *FileStoreStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FileStoreStatus) XXX_Merge(src proto.Message)
- func (*FileStoreStatus) XXX_MessageName() string
- func (m *FileStoreStatus) XXX_Size() int
- func (m *FileStoreStatus) XXX_Unmarshal(b []byte) error
- type FileStoreStatus_MetaState
- type FileStoreStatus_RentalState
- type GuardServiceClient
- type GuardServiceServer
- type Log
- func (*Log) Descriptor() ([]byte, []int)
- func (m *Log) GetChange() string
- func (m *Log) GetChangeTime() time.Time
- func (m *Log) GetOriginatorPid() string
- func (m *Log) Marshal() (dAtA []byte, err error)
- func (m *Log) MarshalTo(dAtA []byte) (int, error)
- func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Log) ProtoMessage()
- func (m *Log) Reset()
- func (m *Log) Size() (n int)
- func (m *Log) String() string
- func (m *Log) Unmarshal(dAtA []byte) error
- func (m *Log) XXX_DiscardUnknown()
- func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Log) XXX_Merge(src proto.Message)
- func (*Log) XXX_MessageName() string
- func (m *Log) XXX_Size() int
- func (m *Log) XXX_Unmarshal(b []byte) error
- type ProofOfReplicateChallenge
- func (*ProofOfReplicateChallenge) Descriptor() ([]byte, []int)
- func (m *ProofOfReplicateChallenge) GetChallengeTime() time.Time
- func (m *ProofOfReplicateChallenge) GetGuardPid() string
- func (m *ProofOfReplicateChallenge) GetGuardSignature() []byte
- func (m *ProofOfReplicateChallenge) GetHostAnswer() string
- func (m *ProofOfReplicateChallenge) GetHostSignTime() time.Time
- func (m *ProofOfReplicateChallenge) GetHostSignature() []byte
- func (m *ProofOfReplicateChallenge) Marshal() (dAtA []byte, err error)
- func (m *ProofOfReplicateChallenge) MarshalTo(dAtA []byte) (int, error)
- func (m *ProofOfReplicateChallenge) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProofOfReplicateChallenge) ProtoMessage()
- func (m *ProofOfReplicateChallenge) Reset()
- func (m *ProofOfReplicateChallenge) Size() (n int)
- func (m *ProofOfReplicateChallenge) String() string
- func (m *ProofOfReplicateChallenge) Unmarshal(dAtA []byte) error
- func (m *ProofOfReplicateChallenge) XXX_DiscardUnknown()
- func (m *ProofOfReplicateChallenge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProofOfReplicateChallenge) XXX_Merge(src proto.Message)
- func (*ProofOfReplicateChallenge) XXX_MessageName() string
- func (m *ProofOfReplicateChallenge) XXX_Size() int
- func (m *ProofOfReplicateChallenge) XXX_Unmarshal(b []byte) error
- type ResponseCode
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetCode() ResponseCode
- func (m *Result) GetMessage() string
- func (m *Result) GetResponseTime() time.Time
- func (m *Result) Marshal() (dAtA []byte, err error)
- func (m *Result) MarshalTo(dAtA []byte) (int, error)
- func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) Size() (n int)
- func (m *Result) String() string
- func (m *Result) Unmarshal(dAtA []byte) error
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (*Result) XXX_MessageName() string
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type ShardChallengeQuestions
- func (*ShardChallengeQuestions) Descriptor() ([]byte, []int)
- func (m *ShardChallengeQuestions) GetFileHash() string
- func (m *ShardChallengeQuestions) GetPrepareTime() time.Time
- func (m *ShardChallengeQuestions) GetPreparerPid() string
- func (m *ShardChallengeQuestions) GetPreparerSignature() []byte
- func (m *ShardChallengeQuestions) GetQuestionCount() int32
- func (m *ShardChallengeQuestions) GetQuestions() []*ChallengeQuestion
- func (m *ShardChallengeQuestions) GetShardHash() string
- func (m *ShardChallengeQuestions) Marshal() (dAtA []byte, err error)
- func (m *ShardChallengeQuestions) MarshalTo(dAtA []byte) (int, error)
- func (m *ShardChallengeQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ShardChallengeQuestions) ProtoMessage()
- func (m *ShardChallengeQuestions) Reset()
- func (m *ShardChallengeQuestions) Size() (n int)
- func (m *ShardChallengeQuestions) String() string
- func (m *ShardChallengeQuestions) Unmarshal(dAtA []byte) error
- func (m *ShardChallengeQuestions) XXX_DiscardUnknown()
- func (m *ShardChallengeQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShardChallengeQuestions) XXX_Merge(src proto.Message)
- func (*ShardChallengeQuestions) XXX_MessageName() string
- func (m *ShardChallengeQuestions) XXX_Size() int
- func (m *ShardChallengeQuestions) XXX_Unmarshal(b []byte) error
- type UnimplementedGuardServiceServer
- func (*UnimplementedGuardServiceServer) CheckFileStoreMeta(ctx context.Context, req *CheckFileStoreMetaRequest) (*FileStoreStatus, error)
- func (*UnimplementedGuardServiceServer) SendQuestions(ctx context.Context, req *FileChallengeQuestions) (*Result, error)
- func (*UnimplementedGuardServiceServer) SubmitFileStoreMeta(ctx context.Context, req *FileStoreStatus) (*Result, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthGuard = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGuard = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGuard = fmt.Errorf("proto: unexpected end of group") )
var ContractMeta_Schedule_name = map[int32]string{
0: "MONTHLY",
1: "QUARTERLY",
2: "ANNUALLY",
}
var ContractMeta_Schedule_value = map[string]int32{
"MONTHLY": 0,
"QUARTERLY": 1,
"ANNUALLY": 2,
}
var Contract_ContractState_name = map[int32]string{
0: "DRAFT",
1: "SIGNED",
2: "UPLOADED",
3: "LOST",
4: "CANCELED",
5: "CLOSED",
6: "RENEWED",
7: "OBSOLETE",
8: "WARN",
}
var Contract_ContractState_value = map[string]int32{
"DRAFT": 0,
"SIGNED": 1,
"UPLOADED": 2,
"LOST": 3,
"CANCELED": 4,
"CLOSED": 5,
"RENEWED": 6,
"OBSOLETE": 7,
"WARN": 8,
}
var FileStoreStatus_MetaState_name = map[int32]string{
0: "DRAFT",
1: "UPLOADING",
2: "RUNNING",
3: "PARTIAL_LOST",
4: "LOST",
5: "DONE",
6: "CANCELED",
}
var FileStoreStatus_MetaState_value = map[string]int32{
"DRAFT": 0,
"UPLOADING": 1,
"RUNNING": 2,
"PARTIAL_LOST": 3,
"LOST": 4,
"DONE": 5,
"CANCELED": 6,
}
var FileStoreStatus_RentalState_name = map[int32]string{
0: "NEW",
1: "PARTIAL_NEW",
2: "EXPIRED",
3: "RENEW",
}
var FileStoreStatus_RentalState_value = map[string]int32{
"NEW": 0,
"PARTIAL_NEW": 1,
"EXPIRED": 2,
"RENEW": 3,
}
var ResponseCode_name = map[int32]string{
0: "SUCCESS",
1: "SIGNATURE_FORMAT_ERROR",
2: "COMPUTE_ADDRESS_ERROR",
20: "OTHER_ERROR",
}
var ResponseCode_value = map[string]int32{
"SUCCESS": 0,
"SIGNATURE_FORMAT_ERROR": 1,
"COMPUTE_ADDRESS_ERROR": 2,
"OTHER_ERROR": 20,
}
Functions ¶
func RegisterGuardServiceServer ¶
func RegisterGuardServiceServer(s *grpc.Server, srv GuardServiceServer)
Types ¶
type ChallengeQuestion ¶
type ChallengeQuestion struct { ShardHash string `protobuf:"bytes,1,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` HostPid string `protobuf:"bytes,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` ChunkIndex int32 `protobuf:"varint,3,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty" pg:"chunk_index"` Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty" pg:"nonce"` ExpectAnswer string `protobuf:"bytes,5,opt,name=expect_answer,json=expectAnswer,proto3" json:"expect_answer,omitempty" pg:"expect_answer"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*ChallengeQuestion) Descriptor ¶
func (*ChallengeQuestion) Descriptor() ([]byte, []int)
func (*ChallengeQuestion) GetChunkIndex ¶
func (m *ChallengeQuestion) GetChunkIndex() int32
func (*ChallengeQuestion) GetExpectAnswer ¶
func (m *ChallengeQuestion) GetExpectAnswer() string
func (*ChallengeQuestion) GetHostPid ¶ added in v0.1.2
func (m *ChallengeQuestion) GetHostPid() string
func (*ChallengeQuestion) GetNonce ¶ added in v0.1.2
func (m *ChallengeQuestion) GetNonce() string
func (*ChallengeQuestion) GetShardHash ¶
func (m *ChallengeQuestion) GetShardHash() string
func (*ChallengeQuestion) Marshal ¶ added in v0.0.13
func (m *ChallengeQuestion) Marshal() (dAtA []byte, err error)
func (*ChallengeQuestion) MarshalTo ¶ added in v0.0.13
func (m *ChallengeQuestion) MarshalTo(dAtA []byte) (int, error)
func (*ChallengeQuestion) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *ChallengeQuestion) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ChallengeQuestion) ProtoMessage ¶
func (*ChallengeQuestion) ProtoMessage()
func (*ChallengeQuestion) Reset ¶
func (m *ChallengeQuestion) Reset()
func (*ChallengeQuestion) Size ¶ added in v0.0.13
func (m *ChallengeQuestion) Size() (n int)
func (*ChallengeQuestion) String ¶
func (m *ChallengeQuestion) String() string
func (*ChallengeQuestion) Unmarshal ¶ added in v0.0.13
func (m *ChallengeQuestion) Unmarshal(dAtA []byte) error
func (*ChallengeQuestion) XXX_DiscardUnknown ¶
func (m *ChallengeQuestion) XXX_DiscardUnknown()
func (*ChallengeQuestion) XXX_Marshal ¶
func (m *ChallengeQuestion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChallengeQuestion) XXX_Merge ¶
func (m *ChallengeQuestion) XXX_Merge(src proto.Message)
func (*ChallengeQuestion) XXX_MessageName ¶ added in v0.0.13
func (*ChallengeQuestion) XXX_MessageName() string
func (*ChallengeQuestion) XXX_Size ¶
func (m *ChallengeQuestion) XXX_Size() int
func (*ChallengeQuestion) XXX_Unmarshal ¶
func (m *ChallengeQuestion) XXX_Unmarshal(b []byte) error
type CheckFileStoreMetaRequest ¶
type CheckFileStoreMetaRequest struct { FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` RenterPid string `protobuf:"bytes,2,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` RequesterPid string `protobuf:"bytes,3,opt,name=requester_pid,json=requesterPid,proto3" json:"requester_pid,omitempty" pg:"requester_pid"` RequestTime time.Time `protobuf:"bytes,4,opt,name=request_time,json=requestTime,proto3,stdtime" json:"request_time" pg:"request_time"` Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*CheckFileStoreMetaRequest) Descriptor ¶
func (*CheckFileStoreMetaRequest) Descriptor() ([]byte, []int)
func (*CheckFileStoreMetaRequest) GetFileHash ¶
func (m *CheckFileStoreMetaRequest) GetFileHash() string
func (*CheckFileStoreMetaRequest) GetRenterPid ¶ added in v0.1.2
func (m *CheckFileStoreMetaRequest) GetRenterPid() string
func (*CheckFileStoreMetaRequest) GetRequestTime ¶ added in v0.0.9
func (m *CheckFileStoreMetaRequest) GetRequestTime() time.Time
func (*CheckFileStoreMetaRequest) GetRequesterPid ¶ added in v0.1.2
func (m *CheckFileStoreMetaRequest) GetRequesterPid() string
func (*CheckFileStoreMetaRequest) GetSignature ¶
func (m *CheckFileStoreMetaRequest) GetSignature() []byte
func (*CheckFileStoreMetaRequest) Marshal ¶ added in v0.0.13
func (m *CheckFileStoreMetaRequest) Marshal() (dAtA []byte, err error)
func (*CheckFileStoreMetaRequest) MarshalTo ¶ added in v0.0.13
func (m *CheckFileStoreMetaRequest) MarshalTo(dAtA []byte) (int, error)
func (*CheckFileStoreMetaRequest) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *CheckFileStoreMetaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CheckFileStoreMetaRequest) ProtoMessage ¶
func (*CheckFileStoreMetaRequest) ProtoMessage()
func (*CheckFileStoreMetaRequest) Reset ¶
func (m *CheckFileStoreMetaRequest) Reset()
func (*CheckFileStoreMetaRequest) Size ¶ added in v0.0.13
func (m *CheckFileStoreMetaRequest) Size() (n int)
func (*CheckFileStoreMetaRequest) String ¶
func (m *CheckFileStoreMetaRequest) String() string
func (*CheckFileStoreMetaRequest) Unmarshal ¶ added in v0.0.13
func (m *CheckFileStoreMetaRequest) Unmarshal(dAtA []byte) error
func (*CheckFileStoreMetaRequest) XXX_DiscardUnknown ¶
func (m *CheckFileStoreMetaRequest) XXX_DiscardUnknown()
func (*CheckFileStoreMetaRequest) XXX_Marshal ¶
func (m *CheckFileStoreMetaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CheckFileStoreMetaRequest) XXX_Merge ¶
func (m *CheckFileStoreMetaRequest) XXX_Merge(src proto.Message)
func (*CheckFileStoreMetaRequest) XXX_MessageName ¶ added in v0.0.13
func (*CheckFileStoreMetaRequest) XXX_MessageName() string
func (*CheckFileStoreMetaRequest) XXX_Size ¶
func (m *CheckFileStoreMetaRequest) XXX_Size() int
func (*CheckFileStoreMetaRequest) XXX_Unmarshal ¶
func (m *CheckFileStoreMetaRequest) XXX_Unmarshal(b []byte) error
type Contract ¶
type Contract struct { //the contract executor record, changed frequently after proposal ContractMeta `protobuf:"bytes,1,opt,name=contract,proto3,embedded=contract" json:"contract" pg:"contract"` State Contract_ContractState `protobuf:"varint,2,opt,name=state,proto3,enum=guard.Contract_ContractState" json:"state,omitempty" pg:"state"` RenterSignature []byte `` /* 128-byte string literal not displayed */ HostSignature []byte `protobuf:"bytes,4,opt,name=host_signature,json=hostSignature,proto3" json:"host_signature,omitempty" pg:"host_signature"` EscrowSignedTime time.Time `` /* 133-byte string literal not displayed */ EscrowSignature []byte `` /* 128-byte string literal not displayed */ ChangeLog []*Log `protobuf:"bytes,7,rep,name=change_log,json=changeLog,proto3" json:"change_log,omitempty" pg:"change_log"` LastModifyTime time.Time `protobuf:"bytes,8,opt,name=last_modify_time,json=lastModifyTime,proto3,stdtime" json:"last_modify_time" pg:"last_modify_time"` GuardSignature []byte `protobuf:"bytes,9,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` PreparerPid string `protobuf:"bytes,10,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` PreparerSignature []byte `` /* 137-byte string literal not displayed */ LastSuccessChallengeTime time.Time `` /* 169-byte string literal not displayed */ LastChallengeTime time.Time `` /* 138-byte string literal not displayed */ ChallengeTimes int32 `` /* 126-byte string literal not displayed */ ChallengeWarnTimes int32 `` /* 145-byte string literal not displayed */ ChallengeSuccessTimes int32 `` /* 157-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*Contract) Descriptor ¶
func (*Contract) GetChallengeSuccessTimes ¶ added in v0.2.13
func (*Contract) GetChallengeTimes ¶ added in v0.2.14
func (*Contract) GetChallengeWarnTimes ¶ added in v0.2.13
func (*Contract) GetChangeLog ¶
func (*Contract) GetEscrowSignature ¶
func (*Contract) GetEscrowSignedTime ¶
func (*Contract) GetGuardSignature ¶
func (*Contract) GetHostSignature ¶
func (*Contract) GetLastChallengeTime ¶ added in v0.2.13
func (*Contract) GetLastModifyTime ¶
func (*Contract) GetLastSuccessChallengeTime ¶ added in v0.2.13
func (*Contract) GetPreparerPid ¶ added in v0.1.4
func (*Contract) GetPreparerSignature ¶ added in v0.1.4
func (*Contract) GetRenterSignature ¶
func (*Contract) GetState ¶
func (m *Contract) GetState() Contract_ContractState
func (*Contract) MarshalToSizedBuffer ¶ added in v0.0.13
func (*Contract) ProtoMessage ¶
func (*Contract) ProtoMessage()
func (*Contract) XXX_DiscardUnknown ¶
func (m *Contract) XXX_DiscardUnknown()
func (*Contract) XXX_Marshal ¶
func (*Contract) XXX_MessageName ¶ added in v0.0.13
func (*Contract) XXX_Unmarshal ¶
type ContractMeta ¶
type ContractMeta struct { //Contract proposed by renter, will not be changed after renter proposed ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty" pg:"contract_id"` RenterPid string `protobuf:"bytes,2,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` HostPid string `protobuf:"bytes,3,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty" pg:"host_pid"` ShardHash string `protobuf:"bytes,4,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` ShardIndex int32 `protobuf:"varint,5,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty" pg:"shard_index"` ShardFileSize int64 `protobuf:"varint,6,opt,name=shard_file_size,json=shardFileSize,proto3" json:"shard_file_size,omitempty" pg:"shard_file_size"` FileHash string `protobuf:"bytes,7,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` RentStart time.Time `protobuf:"bytes,8,opt,name=rent_start,json=rentStart,proto3,stdtime" json:"rent_start" pg:"rent_start"` RentEnd time.Time `protobuf:"bytes,9,opt,name=rent_end,json=rentEnd,proto3,stdtime" json:"rent_end" pg:"rent_end"` GuardPid string `protobuf:"bytes,10,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` EscrowPid string `protobuf:"bytes,11,opt,name=escrow_pid,json=escrowPid,proto3" json:"escrow_pid,omitempty" pg:"escrow_pid"` Price int64 `protobuf:"varint,12,opt,name=price,proto3" json:"price,omitempty" pg:"price"` Amount int64 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty" pg:"amount"` CollateralAmount int64 `` /* 134-byte string literal not displayed */ PayoutSchedule ContractMeta_Schedule `` /* 159-byte string literal not displayed */ NumPayouts int32 `protobuf:"varint,16,opt,name=num_payouts,json=numPayouts,proto3" json:"num_payouts,omitempty" pg:"num_payouts"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
the relationship of the objects from Guard's view FileStoreMeta (1:n) Contract (1:n) payout contract is the signed document between the renter and host for one shard's storage the contract information contains buyer, seller, escrow, guard , storage shard's information, rent duration, amount, payment method(periodically and times) ContractMeta is the information which will not be changed after proposal Contract technically is the contract execution record, it contains the contractMeta and state information
func (*ContractMeta) Descriptor ¶
func (*ContractMeta) Descriptor() ([]byte, []int)
func (*ContractMeta) GetAmount ¶
func (m *ContractMeta) GetAmount() int64
func (*ContractMeta) GetCollateralAmount ¶ added in v0.0.11
func (m *ContractMeta) GetCollateralAmount() int64
func (*ContractMeta) GetContractId ¶
func (m *ContractMeta) GetContractId() string
func (*ContractMeta) GetEscrowPid ¶ added in v0.1.2
func (m *ContractMeta) GetEscrowPid() string
func (*ContractMeta) GetFileHash ¶
func (m *ContractMeta) GetFileHash() string
func (*ContractMeta) GetGuardPid ¶ added in v0.1.2
func (m *ContractMeta) GetGuardPid() string
func (*ContractMeta) GetHostPid ¶ added in v0.1.2
func (m *ContractMeta) GetHostPid() string
func (*ContractMeta) GetNumPayouts ¶
func (m *ContractMeta) GetNumPayouts() int32
func (*ContractMeta) GetPayoutSchedule ¶
func (m *ContractMeta) GetPayoutSchedule() ContractMeta_Schedule
func (*ContractMeta) GetPrice ¶
func (m *ContractMeta) GetPrice() int64
func (*ContractMeta) GetRentEnd ¶
func (m *ContractMeta) GetRentEnd() time.Time
func (*ContractMeta) GetRentStart ¶
func (m *ContractMeta) GetRentStart() time.Time
func (*ContractMeta) GetRenterPid ¶ added in v0.1.2
func (m *ContractMeta) GetRenterPid() string
func (*ContractMeta) GetShardFileSize ¶
func (m *ContractMeta) GetShardFileSize() int64
func (*ContractMeta) GetShardHash ¶
func (m *ContractMeta) GetShardHash() string
func (*ContractMeta) GetShardIndex ¶
func (m *ContractMeta) GetShardIndex() int32
func (*ContractMeta) Marshal ¶ added in v0.0.13
func (m *ContractMeta) Marshal() (dAtA []byte, err error)
func (*ContractMeta) MarshalTo ¶ added in v0.0.13
func (m *ContractMeta) MarshalTo(dAtA []byte) (int, error)
func (*ContractMeta) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *ContractMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ContractMeta) ProtoMessage ¶
func (*ContractMeta) ProtoMessage()
func (*ContractMeta) Reset ¶
func (m *ContractMeta) Reset()
func (*ContractMeta) Size ¶ added in v0.0.13
func (m *ContractMeta) Size() (n int)
func (*ContractMeta) String ¶
func (m *ContractMeta) String() string
func (*ContractMeta) Unmarshal ¶ added in v0.0.13
func (m *ContractMeta) Unmarshal(dAtA []byte) error
func (*ContractMeta) XXX_DiscardUnknown ¶
func (m *ContractMeta) XXX_DiscardUnknown()
func (*ContractMeta) XXX_Marshal ¶
func (m *ContractMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ContractMeta) XXX_Merge ¶
func (m *ContractMeta) XXX_Merge(src proto.Message)
func (*ContractMeta) XXX_MessageName ¶ added in v0.0.13
func (*ContractMeta) XXX_MessageName() string
func (*ContractMeta) XXX_Size ¶
func (m *ContractMeta) XXX_Size() int
func (*ContractMeta) XXX_Unmarshal ¶
func (m *ContractMeta) XXX_Unmarshal(b []byte) error
type ContractMeta_Schedule ¶
type ContractMeta_Schedule int32
const ( ContractMeta_MONTHLY ContractMeta_Schedule = 0 ContractMeta_QUARTERLY ContractMeta_Schedule = 1 ContractMeta_ANNUALLY ContractMeta_Schedule = 2 )
func (ContractMeta_Schedule) EnumDescriptor ¶
func (ContractMeta_Schedule) EnumDescriptor() ([]byte, []int)
func (ContractMeta_Schedule) String ¶
func (x ContractMeta_Schedule) String() string
type Contract_ContractState ¶
type Contract_ContractState int32
const ( Contract_DRAFT Contract_ContractState = 0 Contract_SIGNED Contract_ContractState = 1 Contract_UPLOADED Contract_ContractState = 2 Contract_LOST Contract_ContractState = 3 Contract_CANCELED Contract_ContractState = 4 Contract_CLOSED Contract_ContractState = 5 Contract_RENEWED Contract_ContractState = 6 Contract_OBSOLETE Contract_ContractState = 7 Contract_WARN Contract_ContractState = 8 )
func (Contract_ContractState) EnumDescriptor ¶
func (Contract_ContractState) EnumDescriptor() ([]byte, []int)
func (Contract_ContractState) String ¶
func (x Contract_ContractState) String() string
type FileChallengeQuestions ¶
type FileChallengeQuestions struct { FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` ShardQuestions []*ShardChallengeQuestions `protobuf:"bytes,2,rep,name=shard_questions,json=shardQuestions,proto3" json:"shard_questions,omitempty" pg:"shard_questions"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*FileChallengeQuestions) Descriptor ¶
func (*FileChallengeQuestions) Descriptor() ([]byte, []int)
func (*FileChallengeQuestions) GetFileHash ¶
func (m *FileChallengeQuestions) GetFileHash() string
func (*FileChallengeQuestions) GetShardQuestions ¶
func (m *FileChallengeQuestions) GetShardQuestions() []*ShardChallengeQuestions
func (*FileChallengeQuestions) Marshal ¶ added in v0.0.13
func (m *FileChallengeQuestions) Marshal() (dAtA []byte, err error)
func (*FileChallengeQuestions) MarshalTo ¶ added in v0.0.13
func (m *FileChallengeQuestions) MarshalTo(dAtA []byte) (int, error)
func (*FileChallengeQuestions) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *FileChallengeQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FileChallengeQuestions) ProtoMessage ¶
func (*FileChallengeQuestions) ProtoMessage()
func (*FileChallengeQuestions) Reset ¶
func (m *FileChallengeQuestions) Reset()
func (*FileChallengeQuestions) Size ¶ added in v0.0.13
func (m *FileChallengeQuestions) Size() (n int)
func (*FileChallengeQuestions) String ¶
func (m *FileChallengeQuestions) String() string
func (*FileChallengeQuestions) Unmarshal ¶ added in v0.0.13
func (m *FileChallengeQuestions) Unmarshal(dAtA []byte) error
func (*FileChallengeQuestions) XXX_DiscardUnknown ¶
func (m *FileChallengeQuestions) XXX_DiscardUnknown()
func (*FileChallengeQuestions) XXX_Marshal ¶
func (m *FileChallengeQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FileChallengeQuestions) XXX_Merge ¶
func (m *FileChallengeQuestions) XXX_Merge(src proto.Message)
func (*FileChallengeQuestions) XXX_MessageName ¶ added in v0.0.13
func (*FileChallengeQuestions) XXX_MessageName() string
func (*FileChallengeQuestions) XXX_Size ¶
func (m *FileChallengeQuestions) XXX_Size() int
func (*FileChallengeQuestions) XXX_Unmarshal ¶
func (m *FileChallengeQuestions) XXX_Unmarshal(b []byte) error
type FileStoreMeta ¶
type FileStoreMeta struct { //file store meta prepared by renter, will not changed after proposal RenterPid string `protobuf:"bytes,1,opt,name=renter_pid,json=renterPid,proto3" json:"renter_pid,omitempty" pg:"renter_pid"` FileHash string `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` FileSize int64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` RentStart time.Time `protobuf:"bytes,4,opt,name=rent_start,json=rentStart,proto3,stdtime" json:"rent_start" pg:"rent_start"` RentEnd time.Time `protobuf:"bytes,5,opt,name=rent_end,json=rentEnd,proto3,stdtime" json:"rent_end" pg:"rent_end"` CheckFrequency int32 `protobuf:"varint,6,opt,name=check_frequency,json=checkFrequency,proto3" json:"check_frequency,omitempty" pg:"check_frequency"` GuardFee int64 `protobuf:"varint,7,opt,name=guard_fee,json=guardFee,proto3" json:"guard_fee,omitempty" pg:"guard_fee"` EscrowFee int64 `protobuf:"varint,8,opt,name=escrow_fee,json=escrowFee,proto3" json:"escrow_fee,omitempty" pg:"escrow_fee"` ShardCount int32 `protobuf:"varint,9,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty" pg:"shard_count"` MinimumShards int32 `protobuf:"varint,10,opt,name=minimum_shards,json=minimumShards,proto3" json:"minimum_shards,omitempty" pg:"minimum_shards"` RecoverThreshold int32 `` /* 134-byte string literal not displayed */ EscrowPid string `protobuf:"bytes,12,opt,name=escrow_pid,json=escrowPid,proto3" json:"escrow_pid,omitempty" pg:"escrow_pid"` GuardPid string `protobuf:"bytes,13,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` WarnChallengeTimesLimit int32 `` /* 168-byte string literal not displayed */ SuccessChallengeTimesLimit int32 `` /* 180-byte string literal not displayed */ CheckFrequencyWarn int32 `` /* 145-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*FileStoreMeta) Descriptor ¶
func (*FileStoreMeta) Descriptor() ([]byte, []int)
func (*FileStoreMeta) GetCheckFrequency ¶ added in v0.0.11
func (m *FileStoreMeta) GetCheckFrequency() int32
func (*FileStoreMeta) GetCheckFrequencyWarn ¶ added in v0.2.13
func (m *FileStoreMeta) GetCheckFrequencyWarn() int32
func (*FileStoreMeta) GetEscrowFee ¶
func (m *FileStoreMeta) GetEscrowFee() int64
func (*FileStoreMeta) GetEscrowPid ¶ added in v0.1.2
func (m *FileStoreMeta) GetEscrowPid() string
func (*FileStoreMeta) GetFileHash ¶
func (m *FileStoreMeta) GetFileHash() string
func (*FileStoreMeta) GetFileSize ¶
func (m *FileStoreMeta) GetFileSize() int64
func (*FileStoreMeta) GetGuardFee ¶
func (m *FileStoreMeta) GetGuardFee() int64
func (*FileStoreMeta) GetGuardPid ¶ added in v0.1.2
func (m *FileStoreMeta) GetGuardPid() string
func (*FileStoreMeta) GetMinimumShards ¶
func (m *FileStoreMeta) GetMinimumShards() int32
func (*FileStoreMeta) GetRecoverThreshold ¶
func (m *FileStoreMeta) GetRecoverThreshold() int32
func (*FileStoreMeta) GetRentEnd ¶
func (m *FileStoreMeta) GetRentEnd() time.Time
func (*FileStoreMeta) GetRentStart ¶
func (m *FileStoreMeta) GetRentStart() time.Time
func (*FileStoreMeta) GetRenterPid ¶ added in v0.1.2
func (m *FileStoreMeta) GetRenterPid() string
func (*FileStoreMeta) GetShardCount ¶
func (m *FileStoreMeta) GetShardCount() int32
func (*FileStoreMeta) GetSuccessChallengeTimesLimit ¶ added in v0.2.14
func (m *FileStoreMeta) GetSuccessChallengeTimesLimit() int32
func (*FileStoreMeta) GetWarnChallengeTimesLimit ¶ added in v0.2.14
func (m *FileStoreMeta) GetWarnChallengeTimesLimit() int32
func (*FileStoreMeta) Marshal ¶ added in v0.0.13
func (m *FileStoreMeta) Marshal() (dAtA []byte, err error)
func (*FileStoreMeta) MarshalTo ¶ added in v0.0.13
func (m *FileStoreMeta) MarshalTo(dAtA []byte) (int, error)
func (*FileStoreMeta) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *FileStoreMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FileStoreMeta) ProtoMessage ¶
func (*FileStoreMeta) ProtoMessage()
func (*FileStoreMeta) Reset ¶
func (m *FileStoreMeta) Reset()
func (*FileStoreMeta) Size ¶ added in v0.0.13
func (m *FileStoreMeta) Size() (n int)
func (*FileStoreMeta) String ¶
func (m *FileStoreMeta) String() string
func (*FileStoreMeta) Unmarshal ¶ added in v0.0.13
func (m *FileStoreMeta) Unmarshal(dAtA []byte) error
func (*FileStoreMeta) XXX_DiscardUnknown ¶
func (m *FileStoreMeta) XXX_DiscardUnknown()
func (*FileStoreMeta) XXX_Marshal ¶
func (m *FileStoreMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FileStoreMeta) XXX_Merge ¶
func (m *FileStoreMeta) XXX_Merge(src proto.Message)
func (*FileStoreMeta) XXX_MessageName ¶ added in v0.0.13
func (*FileStoreMeta) XXX_MessageName() string
func (*FileStoreMeta) XXX_Size ¶
func (m *FileStoreMeta) XXX_Size() int
func (*FileStoreMeta) XXX_Unmarshal ¶
func (m *FileStoreMeta) XXX_Unmarshal(b []byte) error
type FileStoreStatus ¶
type FileStoreStatus struct { FileStoreMeta `` /* 138-byte string literal not displayed */ State FileStoreStatus_MetaState `protobuf:"varint,2,opt,name=state,proto3,enum=guard.FileStoreStatus_MetaState" json:"state,omitempty" pg:"state"` Contracts []*Contract `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" pg:"contracts"` RenterSignature []byte `` /* 128-byte string literal not displayed */ GuardReceiveTime time.Time `` /* 133-byte string literal not displayed */ ChangeLog []*Log `protobuf:"bytes,6,rep,name=change_log,json=changeLog,proto3" json:"change_log,omitempty" pg:"change_log"` CurrentTime time.Time `protobuf:"bytes,7,opt,name=current_time,json=currentTime,proto3,stdtime" json:"current_time" pg:"current_time"` GuardSignature []byte `protobuf:"bytes,8,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` RentalState FileStoreStatus_RentalState `` /* 152-byte string literal not displayed */ PreparerPid string `protobuf:"bytes,10,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` PreparerSignature []byte `` /* 137-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*FileStoreStatus) Descriptor ¶
func (*FileStoreStatus) Descriptor() ([]byte, []int)
func (*FileStoreStatus) GetChangeLog ¶
func (m *FileStoreStatus) GetChangeLog() []*Log
func (*FileStoreStatus) GetContracts ¶
func (m *FileStoreStatus) GetContracts() []*Contract
func (*FileStoreStatus) GetCurrentTime ¶ added in v0.1.2
func (m *FileStoreStatus) GetCurrentTime() time.Time
func (*FileStoreStatus) GetGuardReceiveTime ¶
func (m *FileStoreStatus) GetGuardReceiveTime() time.Time
func (*FileStoreStatus) GetGuardSignature ¶
func (m *FileStoreStatus) GetGuardSignature() []byte
func (*FileStoreStatus) GetPreparerPid ¶ added in v0.1.4
func (m *FileStoreStatus) GetPreparerPid() string
func (*FileStoreStatus) GetPreparerSignature ¶ added in v0.1.4
func (m *FileStoreStatus) GetPreparerSignature() []byte
func (*FileStoreStatus) GetRentalState ¶ added in v0.1.4
func (m *FileStoreStatus) GetRentalState() FileStoreStatus_RentalState
func (*FileStoreStatus) GetRenterSignature ¶
func (m *FileStoreStatus) GetRenterSignature() []byte
func (*FileStoreStatus) GetState ¶
func (m *FileStoreStatus) GetState() FileStoreStatus_MetaState
func (*FileStoreStatus) Marshal ¶ added in v0.0.13
func (m *FileStoreStatus) Marshal() (dAtA []byte, err error)
func (*FileStoreStatus) MarshalTo ¶ added in v0.0.13
func (m *FileStoreStatus) MarshalTo(dAtA []byte) (int, error)
func (*FileStoreStatus) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *FileStoreStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FileStoreStatus) ProtoMessage ¶
func (*FileStoreStatus) ProtoMessage()
func (*FileStoreStatus) Reset ¶
func (m *FileStoreStatus) Reset()
func (*FileStoreStatus) Size ¶ added in v0.0.13
func (m *FileStoreStatus) Size() (n int)
func (*FileStoreStatus) String ¶
func (m *FileStoreStatus) String() string
func (*FileStoreStatus) Unmarshal ¶ added in v0.0.13
func (m *FileStoreStatus) Unmarshal(dAtA []byte) error
func (*FileStoreStatus) XXX_DiscardUnknown ¶
func (m *FileStoreStatus) XXX_DiscardUnknown()
func (*FileStoreStatus) XXX_Marshal ¶
func (m *FileStoreStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FileStoreStatus) XXX_Merge ¶
func (m *FileStoreStatus) XXX_Merge(src proto.Message)
func (*FileStoreStatus) XXX_MessageName ¶ added in v0.0.13
func (*FileStoreStatus) XXX_MessageName() string
func (*FileStoreStatus) XXX_Size ¶
func (m *FileStoreStatus) XXX_Size() int
func (*FileStoreStatus) XXX_Unmarshal ¶
func (m *FileStoreStatus) XXX_Unmarshal(b []byte) error
type FileStoreStatus_MetaState ¶
type FileStoreStatus_MetaState int32
const ( FileStoreStatus_DRAFT FileStoreStatus_MetaState = 0 FileStoreStatus_UPLOADING FileStoreStatus_MetaState = 1 FileStoreStatus_RUNNING FileStoreStatus_MetaState = 2 FileStoreStatus_PARTIAL_LOST FileStoreStatus_MetaState = 3 FileStoreStatus_LOST FileStoreStatus_MetaState = 4 FileStoreStatus_DONE FileStoreStatus_MetaState = 5 FileStoreStatus_CANCELED FileStoreStatus_MetaState = 6 )
func (FileStoreStatus_MetaState) EnumDescriptor ¶
func (FileStoreStatus_MetaState) EnumDescriptor() ([]byte, []int)
func (FileStoreStatus_MetaState) String ¶
func (x FileStoreStatus_MetaState) String() string
type FileStoreStatus_RentalState ¶ added in v0.1.4
type FileStoreStatus_RentalState int32
const ( FileStoreStatus_NEW FileStoreStatus_RentalState = 0 FileStoreStatus_PARTIAL_NEW FileStoreStatus_RentalState = 1 FileStoreStatus_EXPIRED FileStoreStatus_RentalState = 2 FileStoreStatus_RENEW FileStoreStatus_RentalState = 3 )
func (FileStoreStatus_RentalState) EnumDescriptor ¶ added in v0.1.4
func (FileStoreStatus_RentalState) EnumDescriptor() ([]byte, []int)
func (FileStoreStatus_RentalState) String ¶ added in v0.1.4
func (x FileStoreStatus_RentalState) String() string
type GuardServiceClient ¶
type GuardServiceClient interface { SubmitFileStoreMeta(ctx context.Context, in *FileStoreStatus, opts ...grpc.CallOption) (*Result, error) SendQuestions(ctx context.Context, in *FileChallengeQuestions, opts ...grpc.CallOption) (*Result, error) CheckFileStoreMeta(ctx context.Context, in *CheckFileStoreMetaRequest, opts ...grpc.CallOption) (*FileStoreStatus, error) }
GuardServiceClient is the client API for GuardService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGuardServiceClient ¶
func NewGuardServiceClient(cc *grpc.ClientConn) GuardServiceClient
type GuardServiceServer ¶
type GuardServiceServer interface { SubmitFileStoreMeta(context.Context, *FileStoreStatus) (*Result, error) SendQuestions(context.Context, *FileChallengeQuestions) (*Result, error) CheckFileStoreMeta(context.Context, *CheckFileStoreMetaRequest) (*FileStoreStatus, error) }
GuardServiceServer is the server API for GuardService service.
type Log ¶
type Log struct { ChangeTime time.Time `protobuf:"bytes,1,opt,name=change_time,json=changeTime,proto3,stdtime" json:"change_time" pg:"change_time"` OriginatorPid string `protobuf:"bytes,2,opt,name=originator_pid,json=originatorPid,proto3" json:"originator_pid,omitempty" pg:"originator_pid"` Change string `protobuf:"bytes,3,opt,name=change,proto3" json:"change,omitempty" pg:"change"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*Log) Descriptor ¶
func (*Log) GetChangeTime ¶
func (*Log) GetOriginatorPid ¶ added in v0.1.2
func (*Log) MarshalToSizedBuffer ¶ added in v0.0.13
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) XXX_DiscardUnknown ¶
func (m *Log) XXX_DiscardUnknown()
func (*Log) XXX_MessageName ¶ added in v0.0.13
func (*Log) XXX_Unmarshal ¶
type ProofOfReplicateChallenge ¶
type ProofOfReplicateChallenge struct { ChallengeQuestion `protobuf:"bytes,1,opt,name=question,proto3,embedded=question" json:"question" pg:"question"` ChallengeTime time.Time `protobuf:"bytes,2,opt,name=challenge_time,json=challengeTime,proto3,stdtime" json:"challenge_time" pg:"challenge_time"` GuardPid string `protobuf:"bytes,3,opt,name=guard_pid,json=guardPid,proto3" json:"guard_pid,omitempty" pg:"guard_pid"` GuardSignature []byte `protobuf:"bytes,4,opt,name=guard_signature,json=guardSignature,proto3" json:"guard_signature,omitempty" pg:"guard_signature"` HostAnswer string `protobuf:"bytes,5,opt,name=host_answer,json=hostAnswer,proto3" json:"host_answer,omitempty" pg:"host_answer"` HostSignTime time.Time `protobuf:"bytes,6,opt,name=host_sign_time,json=hostSignTime,proto3,stdtime" json:"host_sign_time" pg:"host_sign_time"` HostSignature []byte `protobuf:"bytes,7,opt,name=host_signature,json=hostSignature,proto3" json:"host_signature,omitempty" pg:"host_signature"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*ProofOfReplicateChallenge) Descriptor ¶
func (*ProofOfReplicateChallenge) Descriptor() ([]byte, []int)
func (*ProofOfReplicateChallenge) GetChallengeTime ¶
func (m *ProofOfReplicateChallenge) GetChallengeTime() time.Time
func (*ProofOfReplicateChallenge) GetGuardPid ¶ added in v0.1.2
func (m *ProofOfReplicateChallenge) GetGuardPid() string
func (*ProofOfReplicateChallenge) GetGuardSignature ¶
func (m *ProofOfReplicateChallenge) GetGuardSignature() []byte
func (*ProofOfReplicateChallenge) GetHostAnswer ¶
func (m *ProofOfReplicateChallenge) GetHostAnswer() string
func (*ProofOfReplicateChallenge) GetHostSignTime ¶
func (m *ProofOfReplicateChallenge) GetHostSignTime() time.Time
func (*ProofOfReplicateChallenge) GetHostSignature ¶
func (m *ProofOfReplicateChallenge) GetHostSignature() []byte
func (*ProofOfReplicateChallenge) Marshal ¶ added in v0.0.13
func (m *ProofOfReplicateChallenge) Marshal() (dAtA []byte, err error)
func (*ProofOfReplicateChallenge) MarshalTo ¶ added in v0.0.13
func (m *ProofOfReplicateChallenge) MarshalTo(dAtA []byte) (int, error)
func (*ProofOfReplicateChallenge) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *ProofOfReplicateChallenge) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProofOfReplicateChallenge) ProtoMessage ¶
func (*ProofOfReplicateChallenge) ProtoMessage()
func (*ProofOfReplicateChallenge) Reset ¶
func (m *ProofOfReplicateChallenge) Reset()
func (*ProofOfReplicateChallenge) Size ¶ added in v0.0.13
func (m *ProofOfReplicateChallenge) Size() (n int)
func (*ProofOfReplicateChallenge) String ¶
func (m *ProofOfReplicateChallenge) String() string
func (*ProofOfReplicateChallenge) Unmarshal ¶ added in v0.0.13
func (m *ProofOfReplicateChallenge) Unmarshal(dAtA []byte) error
func (*ProofOfReplicateChallenge) XXX_DiscardUnknown ¶
func (m *ProofOfReplicateChallenge) XXX_DiscardUnknown()
func (*ProofOfReplicateChallenge) XXX_Marshal ¶
func (m *ProofOfReplicateChallenge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProofOfReplicateChallenge) XXX_Merge ¶
func (m *ProofOfReplicateChallenge) XXX_Merge(src proto.Message)
func (*ProofOfReplicateChallenge) XXX_MessageName ¶ added in v0.0.13
func (*ProofOfReplicateChallenge) XXX_MessageName() string
func (*ProofOfReplicateChallenge) XXX_Size ¶
func (m *ProofOfReplicateChallenge) XXX_Size() int
func (*ProofOfReplicateChallenge) XXX_Unmarshal ¶
func (m *ProofOfReplicateChallenge) XXX_Unmarshal(b []byte) error
type ResponseCode ¶
type ResponseCode int32
const ( ResponseCode_SUCCESS ResponseCode = 0 ResponseCode_SIGNATURE_FORMAT_ERROR ResponseCode = 1 ResponseCode_COMPUTE_ADDRESS_ERROR ResponseCode = 2 ResponseCode_OTHER_ERROR ResponseCode = 20 )
func (ResponseCode) EnumDescriptor ¶
func (ResponseCode) EnumDescriptor() ([]byte, []int)
func (ResponseCode) String ¶
func (x ResponseCode) String() string
type Result ¶
type Result struct { Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=guard.ResponseCode" json:"code,omitempty" pg:"code"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*Result) Descriptor ¶
func (*Result) GetCode ¶
func (m *Result) GetCode() ResponseCode
func (*Result) GetMessage ¶
func (*Result) GetResponseTime ¶
func (*Result) MarshalToSizedBuffer ¶ added in v0.0.13
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_MessageName ¶ added in v0.0.13
func (*Result) XXX_Unmarshal ¶
type ShardChallengeQuestions ¶ added in v0.0.9
type ShardChallengeQuestions struct { FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` ShardHash string `protobuf:"bytes,2,opt,name=shard_hash,json=shardHash,proto3" json:"shard_hash,omitempty" pg:"shard_hash"` PreparerPid string `protobuf:"bytes,3,opt,name=preparer_pid,json=preparerPid,proto3" json:"preparer_pid,omitempty" pg:"preparer_pid"` QuestionCount int32 `protobuf:"varint,4,opt,name=question_count,json=questionCount,proto3" json:"question_count,omitempty" pg:"question_count"` Questions []*ChallengeQuestion `protobuf:"bytes,5,rep,name=questions,proto3" json:"questions,omitempty" pg:"questions"` PrepareTime time.Time `protobuf:"bytes,6,opt,name=prepare_time,json=prepareTime,proto3,stdtime" json:"prepare_time" pg:"prepare_time"` PreparerSignature []byte `` /* 136-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
func (*ShardChallengeQuestions) Descriptor ¶ added in v0.0.9
func (*ShardChallengeQuestions) Descriptor() ([]byte, []int)
func (*ShardChallengeQuestions) GetFileHash ¶ added in v0.0.9
func (m *ShardChallengeQuestions) GetFileHash() string
func (*ShardChallengeQuestions) GetPrepareTime ¶ added in v0.0.9
func (m *ShardChallengeQuestions) GetPrepareTime() time.Time
func (*ShardChallengeQuestions) GetPreparerPid ¶ added in v0.1.2
func (m *ShardChallengeQuestions) GetPreparerPid() string
func (*ShardChallengeQuestions) GetPreparerSignature ¶ added in v0.0.9
func (m *ShardChallengeQuestions) GetPreparerSignature() []byte
func (*ShardChallengeQuestions) GetQuestionCount ¶ added in v0.0.9
func (m *ShardChallengeQuestions) GetQuestionCount() int32
func (*ShardChallengeQuestions) GetQuestions ¶ added in v0.0.9
func (m *ShardChallengeQuestions) GetQuestions() []*ChallengeQuestion
func (*ShardChallengeQuestions) GetShardHash ¶ added in v0.0.9
func (m *ShardChallengeQuestions) GetShardHash() string
func (*ShardChallengeQuestions) Marshal ¶ added in v0.0.13
func (m *ShardChallengeQuestions) Marshal() (dAtA []byte, err error)
func (*ShardChallengeQuestions) MarshalTo ¶ added in v0.0.13
func (m *ShardChallengeQuestions) MarshalTo(dAtA []byte) (int, error)
func (*ShardChallengeQuestions) MarshalToSizedBuffer ¶ added in v0.0.13
func (m *ShardChallengeQuestions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ShardChallengeQuestions) ProtoMessage ¶ added in v0.0.9
func (*ShardChallengeQuestions) ProtoMessage()
func (*ShardChallengeQuestions) Reset ¶ added in v0.0.9
func (m *ShardChallengeQuestions) Reset()
func (*ShardChallengeQuestions) Size ¶ added in v0.0.13
func (m *ShardChallengeQuestions) Size() (n int)
func (*ShardChallengeQuestions) String ¶ added in v0.0.9
func (m *ShardChallengeQuestions) String() string
func (*ShardChallengeQuestions) Unmarshal ¶ added in v0.0.13
func (m *ShardChallengeQuestions) Unmarshal(dAtA []byte) error
func (*ShardChallengeQuestions) XXX_DiscardUnknown ¶ added in v0.0.9
func (m *ShardChallengeQuestions) XXX_DiscardUnknown()
func (*ShardChallengeQuestions) XXX_Marshal ¶ added in v0.0.9
func (m *ShardChallengeQuestions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShardChallengeQuestions) XXX_Merge ¶ added in v0.0.9
func (m *ShardChallengeQuestions) XXX_Merge(src proto.Message)
func (*ShardChallengeQuestions) XXX_MessageName ¶ added in v0.0.13
func (*ShardChallengeQuestions) XXX_MessageName() string
func (*ShardChallengeQuestions) XXX_Size ¶ added in v0.0.9
func (m *ShardChallengeQuestions) XXX_Size() int
func (*ShardChallengeQuestions) XXX_Unmarshal ¶ added in v0.0.9
func (m *ShardChallengeQuestions) XXX_Unmarshal(b []byte) error
type UnimplementedGuardServiceServer ¶
type UnimplementedGuardServiceServer struct { }
UnimplementedGuardServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedGuardServiceServer) CheckFileStoreMeta ¶
func (*UnimplementedGuardServiceServer) CheckFileStoreMeta(ctx context.Context, req *CheckFileStoreMetaRequest) (*FileStoreStatus, error)
func (*UnimplementedGuardServiceServer) SendQuestions ¶
func (*UnimplementedGuardServiceServer) SendQuestions(ctx context.Context, req *FileChallengeQuestions) (*Result, error)
func (*UnimplementedGuardServiceServer) SubmitFileStoreMeta ¶
func (*UnimplementedGuardServiceServer) SubmitFileStoreMeta(ctx context.Context, req *FileStoreStatus) (*Result, error)