Documentation
¶
Index ¶
- Variables
- func ToProtoStorageJobs(jobs []ffs.StorageJob) ([]*proto.Job, error)
- func ToRPCStorageConfig(config ffs.StorageConfig) *proto.StorageConfig
- type Service
- func (s *Service) Addresses(ctx context.Context, req *proto.AddressesRequest) (*proto.AddressesResponse, error)
- func (s *Service) ApplyStorageConfig(ctx context.Context, req *proto.ApplyStorageConfigRequest) (*proto.ApplyStorageConfigResponse, error)
- func (s *Service) Balance(ctx context.Context, req *proto.BalanceRequest) (*proto.BalanceResponse, error)
- func (s *Service) BuildInfo(ctx context.Context, req *proto.BuildInfoRequest) (*proto.BuildInfoResponse, error)
- func (s *Service) CancelStorageJob(ctx context.Context, req *proto.CancelStorageJobRequest) (*proto.CancelStorageJobResponse, error)
- func (s *Service) CidInfo(ctx context.Context, req *proto.CidInfoRequest) (*proto.CidInfoResponse, error)
- func (s *Service) DefaultStorageConfig(ctx context.Context, req *proto.DefaultStorageConfigRequest) (*proto.DefaultStorageConfigResponse, error)
- func (s *Service) ExecutingStorageJobs(ctx context.Context, req *proto.ExecutingStorageJobsRequest) (*proto.ExecutingStorageJobsResponse, error)
- func (s *Service) Get(req *proto.GetRequest, srv proto.PowergateService_GetServer) error
- func (s *Service) LatestFinalStorageJobs(ctx context.Context, req *proto.LatestFinalStorageJobsRequest) (*proto.LatestFinalStorageJobsResponse, error)
- func (s *Service) LatestSuccessfulStorageJobs(ctx context.Context, req *proto.LatestSuccessfulStorageJobsRequest) (*proto.LatestSuccessfulStorageJobsResponse, error)
- func (s *Service) NewAddress(ctx context.Context, req *proto.NewAddressRequest) (*proto.NewAddressResponse, error)
- func (s *Service) QueuedStorageJobs(ctx context.Context, req *proto.QueuedStorageJobsRequest) (*proto.QueuedStorageJobsResponse, error)
- func (s *Service) Remove(ctx context.Context, req *proto.RemoveRequest) (*proto.RemoveResponse, error)
- func (s *Service) ReplaceData(ctx context.Context, req *proto.ReplaceDataRequest) (*proto.ReplaceDataResponse, error)
- func (s *Service) RetrievalDealRecords(ctx context.Context, req *proto.RetrievalDealRecordsRequest) (*proto.RetrievalDealRecordsResponse, error)
- func (s *Service) SendFil(ctx context.Context, req *proto.SendFilRequest) (*proto.SendFilResponse, error)
- func (s *Service) SetDefaultStorageConfig(ctx context.Context, req *proto.SetDefaultStorageConfigRequest) (*proto.SetDefaultStorageConfigResponse, error)
- func (s *Service) SignMessage(ctx context.Context, req *proto.SignMessageRequest) (*proto.SignMessageResponse, error)
- func (s *Service) Stage(srv proto.PowergateService_StageServer) error
- func (s *Service) StorageConfigForJob(ctx context.Context, req *proto.StorageConfigForJobRequest) (*proto.StorageConfigForJobResponse, error)
- func (s *Service) StorageDealRecords(ctx context.Context, req *proto.StorageDealRecordsRequest) (*proto.StorageDealRecordsResponse, error)
- func (s *Service) StorageJob(ctx context.Context, req *proto.StorageJobRequest) (*proto.StorageJobResponse, error)
- func (s *Service) StorageJobsSummary(ctx context.Context, req *proto.StorageJobsSummaryRequest) (*proto.StorageJobsSummaryResponse, error)
- func (s *Service) StorageProfileIdentifier(ctx context.Context, req *proto.StorageProfileIdentifierRequest) (*proto.StorageProfileIdentifierResponse, error)
- func (s *Service) VerifyMessage(ctx context.Context, req *proto.VerifyMessageRequest) (*proto.VerifyMessageResponse, error)
- func (s *Service) WatchLogs(req *proto.WatchLogsRequest, srv proto.PowergateService_WatchLogsServer) error
- func (s *Service) WatchStorageJobs(req *proto.WatchStorageJobsRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyAuthToken is returned when the provided auth-token is unknown. ErrEmptyAuthToken = errors.New("auth token can't be empty") )
Functions ¶
func ToProtoStorageJobs ¶
func ToProtoStorageJobs(jobs []ffs.StorageJob) ([]*proto.Job, error)
ToProtoStorageJobs converts a slice of ffs.StorageJobs to proto Jobs.
func ToRPCStorageConfig ¶
func ToRPCStorageConfig(config ffs.StorageConfig) *proto.StorageConfig
ToRPCStorageConfig converts from a ffs.StorageConfig to a rpc StorageConfig.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the Powergate API.
func (*Service) Addresses ¶
func (s *Service) Addresses(ctx context.Context, req *proto.AddressesRequest) (*proto.AddressesResponse, error)
Addresses calls ffs.Addrs.
func (*Service) ApplyStorageConfig ¶
func (s *Service) ApplyStorageConfig(ctx context.Context, req *proto.ApplyStorageConfigRequest) (*proto.ApplyStorageConfigResponse, error)
ApplyStorageConfig applies the provided cid storage config.
func (*Service) Balance ¶
func (s *Service) Balance(ctx context.Context, req *proto.BalanceRequest) (*proto.BalanceResponse, error)
Balance returns the balance for an address.
func (*Service) BuildInfo ¶
func (s *Service) BuildInfo(ctx context.Context, req *proto.BuildInfoRequest) (*proto.BuildInfoResponse, error)
BuildInfo returns information about the powergate build.
func (*Service) CancelStorageJob ¶
func (s *Service) CancelStorageJob(ctx context.Context, req *proto.CancelStorageJobRequest) (*proto.CancelStorageJobResponse, error)
CancelStorageJob calls API.CancelJob.
func (*Service) CidInfo ¶
func (s *Service) CidInfo(ctx context.Context, req *proto.CidInfoRequest) (*proto.CidInfoResponse, error)
CidInfo returns information about cids managed by the FFS instance.
func (*Service) DefaultStorageConfig ¶
func (s *Service) DefaultStorageConfig(ctx context.Context, req *proto.DefaultStorageConfigRequest) (*proto.DefaultStorageConfigResponse, error)
DefaultStorageConfig calls ffs.DefaultStorageConfig.
func (*Service) ExecutingStorageJobs ¶
func (s *Service) ExecutingStorageJobs(ctx context.Context, req *proto.ExecutingStorageJobsRequest) (*proto.ExecutingStorageJobsResponse, error)
ExecutingStorageJobs returns a list of executing storage jobs.
func (*Service) Get ¶
func (s *Service) Get(req *proto.GetRequest, srv proto.PowergateService_GetServer) error
Get gets the data for a stored Cid.
func (*Service) LatestFinalStorageJobs ¶
func (s *Service) LatestFinalStorageJobs(ctx context.Context, req *proto.LatestFinalStorageJobsRequest) (*proto.LatestFinalStorageJobsResponse, error)
LatestFinalStorageJobs returns a list of latest final storage jobs.
func (*Service) LatestSuccessfulStorageJobs ¶
func (s *Service) LatestSuccessfulStorageJobs(ctx context.Context, req *proto.LatestSuccessfulStorageJobsRequest) (*proto.LatestSuccessfulStorageJobsResponse, error)
LatestSuccessfulStorageJobs returns a list of latest successful storage jobs.
func (*Service) NewAddress ¶
func (s *Service) NewAddress(ctx context.Context, req *proto.NewAddressRequest) (*proto.NewAddressResponse, error)
NewAddress calls ffs.NewAddr.
func (*Service) QueuedStorageJobs ¶
func (s *Service) QueuedStorageJobs(ctx context.Context, req *proto.QueuedStorageJobsRequest) (*proto.QueuedStorageJobsResponse, error)
QueuedStorageJobs returns a list of queued storage jobs.
func (*Service) Remove ¶
func (s *Service) Remove(ctx context.Context, req *proto.RemoveRequest) (*proto.RemoveResponse, error)
Remove calls ffs.Remove.
func (*Service) ReplaceData ¶
func (s *Service) ReplaceData(ctx context.Context, req *proto.ReplaceDataRequest) (*proto.ReplaceDataResponse, error)
ReplaceData calls ffs.Replace.
func (*Service) RetrievalDealRecords ¶
func (s *Service) RetrievalDealRecords(ctx context.Context, req *proto.RetrievalDealRecordsRequest) (*proto.RetrievalDealRecordsResponse, error)
RetrievalDealRecords calls ffs.ListRetrievalDealRecords.
func (*Service) SendFil ¶
func (s *Service) SendFil(ctx context.Context, req *proto.SendFilRequest) (*proto.SendFilResponse, error)
SendFil sends fil from a managed address to any other address.
func (*Service) SetDefaultStorageConfig ¶
func (s *Service) SetDefaultStorageConfig(ctx context.Context, req *proto.SetDefaultStorageConfigRequest) (*proto.SetDefaultStorageConfigResponse, error)
SetDefaultStorageConfig sets a new config to be used by default.
func (*Service) SignMessage ¶
func (s *Service) SignMessage(ctx context.Context, req *proto.SignMessageRequest) (*proto.SignMessageResponse, error)
SignMessage calls ffs.SignMessage.
func (*Service) Stage ¶
func (s *Service) Stage(srv proto.PowergateService_StageServer) error
Stage allows you to temporarily cache data in the Hot layer in preparation for pushing a cid storage config.
func (*Service) StorageConfigForJob ¶
func (s *Service) StorageConfigForJob(ctx context.Context, req *proto.StorageConfigForJobRequest) (*proto.StorageConfigForJobResponse, error)
StorageConfigForJob returns the StorageConfig associated with the job id.
func (*Service) StorageDealRecords ¶
func (s *Service) StorageDealRecords(ctx context.Context, req *proto.StorageDealRecordsRequest) (*proto.StorageDealRecordsResponse, error)
StorageDealRecords calls ffs.ListStorageDealRecords.
func (*Service) StorageJob ¶
func (s *Service) StorageJob(ctx context.Context, req *proto.StorageJobRequest) (*proto.StorageJobResponse, error)
StorageJob calls API.GetStorageJob.
func (*Service) StorageJobsSummary ¶
func (s *Service) StorageJobsSummary(ctx context.Context, req *proto.StorageJobsSummaryRequest) (*proto.StorageJobsSummaryResponse, error)
StorageJobsSummary returns a summary of all storage jobs.
func (*Service) StorageProfileIdentifier ¶
func (s *Service) StorageProfileIdentifier(ctx context.Context, req *proto.StorageProfileIdentifierRequest) (*proto.StorageProfileIdentifierResponse, error)
StorageProfileIdentifier returns the API instance id.
func (*Service) VerifyMessage ¶
func (s *Service) VerifyMessage(ctx context.Context, req *proto.VerifyMessageRequest) (*proto.VerifyMessageResponse, error)
VerifyMessage calls ffs.VerifyMessage.
func (*Service) WatchLogs ¶
func (s *Service) WatchLogs(req *proto.WatchLogsRequest, srv proto.PowergateService_WatchLogsServer) error
WatchLogs returns a stream of human-readable messages related to executions of a Cid. The listener is automatically unsubscribed when the client closes the stream.
func (*Service) WatchStorageJobs ¶
func (s *Service) WatchStorageJobs(req *proto.WatchStorageJobsRequest, srv proto.PowergateService_WatchStorageJobsServer) error
WatchStorageJobs calls API.WatchJobs.