Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { // The dataOwner node uses Write() and Read() to publish or download files Write(context.Context, etype.WriteOptions, io.Reader) (etype.WriteResponse, error) Read(context.Context, etype.ReadOptions) (io.ReadCloser, error) ListUnExpiredFiles(etype.ListFileOptions) ([]blockchain.File, error) ListExpiredFiles(etype.ListFileOptions) ([]blockchain.File, error) GetFileByID(ctx context.Context, id string) (blockchain.FileH, error) GetFileByName(ctx context.Context, pubkey, ns, name string) (blockchain.FileH, error) UpdateFileExpireTime(ctx context.Context, opt etype.UpdateFileEtimeOptions) error AddFileNs(opt etype.AddNsOptions) error UpdateNsReplica(ctx context.Context, opt etype.UpdateNsOptions) error ListFileNs(opt etype.ListNsOptions) ([]blockchain.Namespace, error) GetNsByName(ctx context.Context, pubkey, name string) (blockchain.NamespaceH, error) GetFileSysHealth(ctx context.Context, pubkey string) (blockchain.FileSysHealth, error) GetChallengeByID(id string) (blockchain.Challenge, error) GetChallenges(opt blockchain.ListChallengeOptions) ([]blockchain.Challenge, error) // The Storage node uses Push() or Pull() to store or provide ciphertext slices Push(etype.PushOptions, io.Reader) (etype.PushResponse, error) Pull(etype.PullOptions) (io.ReadCloser, error) // The dataOwner node uses the following methods to operate the applier's authorization request ListFileAuths(etype.ListFileAuthOptions) (blockchain.FileAuthApplications, error) ConfirmAuth(etype.ConfirmAuthOptions) error GetAuthByID(id string) (blockchain.FileAuthApplication, error) ListNodes() (blockchain.Nodes, error) GetNode([]byte) (blockchain.Node, error) GetHeartbeatNum([]byte, int64) (int, int, error) GetNodeHealth([]byte) (string, error) NodeOffline(etype.NodeOperateOptions) error NodeOnline(etype.NodeOperateOptions) error GetSliceMigrateRecords(opt *blockchain.NodeSliceMigrateOptions) (string, error) }
Handler defines all apis exposed The handler under the engine implements the following methods
Click to show internal directories.
Click to hide internal directories.