Documentation ¶
Index ¶
- Variables
- func GetUpdatedGuardContractsForHost(ctx context.Context, n *core.IpfsNode, lastUpdatedTime *time.Time) ([]*guardpb.Contract, error)
- func GetUpdatedGuardContractsForRenter(ctx context.Context, n *core.IpfsNode, lastUpdatedTime *time.Time) ([]*guardpb.Contract, error)
- func ListContracts(d datastore.Datastore, peerId, role string) ([]*nodepb.Contracts_Contract, error)
- func ListHostContracts(ctx context.Context, cfg *config.Config, ...) ([]*guardpb.Contract, bool, error)
- func Save(d datastore.Datastore, cs []*nodepb.Contracts_Contract, role string) error
- func SyncContracts(ctx context.Context, n *core.IpfsNode, req *cmds.Request, env cmds.Environment, ...) error
- type ByTime
Constants ¶
This section is empty.
Variables ¶
View Source
var StorageContractsCmd = &cmds.Command{ Helptext: cmds.HelpText{ Tagline: "Get node storage contracts info.", ShortDescription: ` This command get node storage contracts info respect to different roles.`, }, Subcommands: map[string]*cmds.Command{ "sync": storageContractsSyncCmd, "stat": storageContractsStatCmd, "list": storageContractsListCmd, }, }
Storage Contracts
Includes sub-commands: sync, stat, list
Functions ¶
func GetUpdatedGuardContractsForHost ¶
func GetUpdatedGuardContractsForHost(ctx context.Context, n *core.IpfsNode, lastUpdatedTime *time.Time) ([]*guardpb.Contract, error)
GetUpdatedGuardContractsForHost retrieves updated guard contracts from remote based on latest timestamp and returns the list updated
func GetUpdatedGuardContractsForRenter ¶
func GetUpdatedGuardContractsForRenter(ctx context.Context, n *core.IpfsNode, lastUpdatedTime *time.Time) ([]*guardpb.Contract, error)
GetUpdatedGuardContractsForRenter retrieves updated guard contracts from remote based on latest timestamp and returns the list updated
func ListContracts ¶
func ListContracts(d datastore.Datastore, peerId, role string) ([]*nodepb.Contracts_Contract, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.