Documentation
¶
Index ¶
- Constants
- func ExtractSegmenthash(segment []SegmentInfo) []string
- type ChallengeInfo
- type ChallengeSnapshot
- type Cli
- func (c *Cli) CheckBucketName(bucketname string) bool
- func (c *Cli) CheckSpaceUsageAuthorization(puk []byte) (bool, error)
- func (c *Cli) GenerateStorageOrder(roothash string, segment []SegmentInfo, owner []byte, ...) error
- func (c *Cli) GetFile(roothash, dir string) (string, error)
- func (c *Cli) IncreaseSminerStakes(token string) (string, error)
- func (c *Cli) ProcessingData(path string) ([]SegmentInfo, string, error)
- func (c *Cli) PutFile(owner []byte, segmentInfo []SegmentInfo, roothash, filename, bucketname string) (uint8, error)
- func (c *Cli) QuaryAuthorizedAcc(puk []byte) (string, error)
- func (c *Cli) QueryAllBucketName(owner []byte) ([]string, error)
- func (c *Cli) QueryAssignedMiner(minerTaskList []chain.MinerTaskList) ([]string, error)
- func (c *Cli) QueryChallenge(pubkey []byte) (ChallengeInfo, error)
- func (c *Cli) QueryChallengeSt() (ChallengeSnapshot, error)
- func (c *Cli) QueryNodeConnectionSt() bool
- func (c *Cli) QueryNodeSynchronizationSt() (bool, error)
- func (c *Cli) QueryTeeWorkerList() ([]TeeWorkerSt, error)
- func (c *Cli) QueryTeeWorkerPeerID(puk []byte) ([]byte, error)
- func (c *Cli) QueryUserSpaceSt(puk []byte) (UserSpaceSt, error)
- func (c *Cli) RegisterRole(name string, income string, pledge uint64) (string, error)
- func (c *Cli) ReplaceFile(roothash []string) (string, []string, error)
- func (c *Cli) ReportFiles(roothash []string) (string, []string, error)
- func (c *Cli) Sign(msg []byte) ([]byte, error)
- func (c *Cli) StorageData(roothash string, segment []SegmentInfo, minerTaskList []chain.MinerTaskList) error
- func (c *Cli) SubmitIdleFile(teeAcc []byte, idlefiles []IdleFileMeta) (string, error)
- func (c *Cli) UpdateIncomeAccount(income string) (string, error)
- func (c *Cli) UpdateRoleAddress(name string) (string, error)
- func (c *Cli) Workspace() string
- type Client
- type IdleFileMeta
- type MinerSnapshot
- type NetSnapshot
- type SegmentInfo
- type TeeWorkerSt
- type UserSpaceSt
Constants ¶
View Source
const PrivatekeyFile = ".private"
Variables ¶
This section is empty.
Functions ¶
func ExtractSegmenthash ¶
func ExtractSegmenthash(segment []SegmentInfo) []string
Types ¶
type ChallengeInfo ¶ added in v0.0.26
type ChallengeSnapshot ¶ added in v0.0.30
type ChallengeSnapshot struct {
NetSnapshot NetSnapshot
MinerSnapshot []MinerSnapshot
}
type Cli ¶
func (*Cli) CheckBucketName ¶ added in v0.0.2
func (*Cli) CheckSpaceUsageAuthorization ¶ added in v0.0.30
func (*Cli) GenerateStorageOrder ¶
func (*Cli) IncreaseSminerStakes ¶ added in v0.0.30
func (*Cli) ProcessingData ¶
func (c *Cli) ProcessingData(path string) ([]SegmentInfo, string, error)
func (*Cli) QuaryAuthorizedAcc ¶ added in v0.0.30
func (*Cli) QueryAllBucketName ¶ added in v0.0.30
func (*Cli) QueryAssignedMiner ¶
func (c *Cli) QueryAssignedMiner(minerTaskList []chain.MinerTaskList) ([]string, error)
func (*Cli) QueryChallenge ¶ added in v0.0.26
func (c *Cli) QueryChallenge(pubkey []byte) (ChallengeInfo, error)
func (*Cli) QueryChallengeSt ¶ added in v0.0.30
func (c *Cli) QueryChallengeSt() (ChallengeSnapshot, error)
func (*Cli) QueryNodeConnectionSt ¶ added in v0.0.30
func (*Cli) QueryNodeSynchronizationSt ¶ added in v0.0.30
func (*Cli) QueryTeeWorkerList ¶ added in v0.0.27
func (c *Cli) QueryTeeWorkerList() ([]TeeWorkerSt, error)
func (*Cli) QueryTeeWorkerPeerID ¶ added in v0.0.27
func (*Cli) QueryUserSpaceSt ¶ added in v0.0.30
func (c *Cli) QueryUserSpaceSt(puk []byte) (UserSpaceSt, error)
func (*Cli) RegisterRole ¶ added in v0.0.30
func (*Cli) ReplaceFile ¶ added in v0.0.17
func (*Cli) ReportFiles ¶ added in v0.0.30
func (*Cli) StorageData ¶
func (c *Cli) StorageData(roothash string, segment []SegmentInfo, minerTaskList []chain.MinerTaskList) error
func (*Cli) SubmitIdleFile ¶ added in v0.0.6
func (c *Cli) SubmitIdleFile(teeAcc []byte, idlefiles []IdleFileMeta) (string, error)
func (*Cli) UpdateIncomeAccount ¶ added in v0.0.24
func (*Cli) UpdateRoleAddress ¶ added in v0.0.30
type Client ¶
type Client interface {
Workspace() string
RegisterRole(name string, income string, pledge uint64) (string, error)
QueryAllBucketName(owner []byte) ([]string, error)
CheckSpaceUsageAuthorization(puk []byte) (bool, error)
QueryUserSpaceSt(puk []byte) (UserSpaceSt, error)
QueryChallengeSt() (ChallengeSnapshot, error)
QueryChallenge(puk []byte) (ChallengeInfo, error)
QueryTeeWorkerPeerID(puk []byte) ([]byte, error)
QueryTeeWorkerList() ([]TeeWorkerSt, error)
CheckBucketName(bucketname string) bool
ProcessingData(path string) ([]SegmentInfo, string, error)
PutFile(owner []byte, segmentInfo []SegmentInfo, roothash, filename, bucketname string) (uint8, error)
GetFile(roothash, dir string) (string, error)
UpdateRoleAddress(name string) (string, error)
UpdateIncomeAccount(income string) (string, error)
SubmitIdleFile(teeAcc []byte, idlefiles []IdleFileMeta) (string, error)
ReportFiles(roothash []string) (string, []string, error)
ReplaceFile(roothash []string) (string, []string, error)
IncreaseSminerStakes(token string) (string, error)
}
type IdleFileMeta ¶ added in v0.0.44
type MinerSnapshot ¶ added in v0.0.30
type NetSnapshot ¶ added in v0.0.30
type SegmentInfo ¶
type TeeWorkerSt ¶ added in v0.0.30
Click to show internal directories.
Click to hide internal directories.