Documentation ¶
Index ¶
- Variables
- func ToProtoStorageJobs(jobs []ffs.StorageJob) ([]*userPb.StorageJob, error)
- func ToRPCStorageConfig(config ffs.StorageConfig) *userPb.StorageConfig
- type Service
- func (s *Service) Addresses(ctx context.Context, req *userPb.AddressesRequest) (*userPb.AddressesResponse, error)
- func (s *Service) ApplyStorageConfig(ctx context.Context, req *userPb.ApplyStorageConfigRequest) (*userPb.ApplyStorageConfigResponse, error)
- func (s *Service) Balance(ctx context.Context, req *userPb.BalanceRequest) (*userPb.BalanceResponse, error)
- func (s *Service) BuildInfo(ctx context.Context, req *userPb.BuildInfoRequest) (*userPb.BuildInfoResponse, error)
- func (s *Service) CancelStorageJob(ctx context.Context, req *userPb.CancelStorageJobRequest) (*userPb.CancelStorageJobResponse, error)
- func (s *Service) CidInfo(ctx context.Context, req *userPb.CidInfoRequest) (*userPb.CidInfoResponse, error)
- func (s *Service) DefaultStorageConfig(ctx context.Context, req *userPb.DefaultStorageConfigRequest) (*userPb.DefaultStorageConfigResponse, error)
- func (s *Service) ExecutingStorageJobs(ctx context.Context, req *userPb.ExecutingStorageJobsRequest) (*userPb.ExecutingStorageJobsResponse, error)
- func (s *Service) Get(req *userPb.GetRequest, srv userPb.UserService_GetServer) error
- func (s *Service) LatestFinalStorageJobs(ctx context.Context, req *userPb.LatestFinalStorageJobsRequest) (*userPb.LatestFinalStorageJobsResponse, error)
- func (s *Service) LatestSuccessfulStorageJobs(ctx context.Context, req *userPb.LatestSuccessfulStorageJobsRequest) (*userPb.LatestSuccessfulStorageJobsResponse, error)
- func (s *Service) NewAddress(ctx context.Context, req *userPb.NewAddressRequest) (*userPb.NewAddressResponse, error)
- func (s *Service) QueuedStorageJobs(ctx context.Context, req *userPb.QueuedStorageJobsRequest) (*userPb.QueuedStorageJobsResponse, error)
- func (s *Service) Remove(ctx context.Context, req *userPb.RemoveRequest) (*userPb.RemoveResponse, error)
- func (s *Service) ReplaceData(ctx context.Context, req *userPb.ReplaceDataRequest) (*userPb.ReplaceDataResponse, error)
- func (s *Service) RetrievalDealRecords(ctx context.Context, req *userPb.RetrievalDealRecordsRequest) (*userPb.RetrievalDealRecordsResponse, error)
- func (s *Service) SendFil(ctx context.Context, req *userPb.SendFilRequest) (*userPb.SendFilResponse, error)
- func (s *Service) SetDefaultStorageConfig(ctx context.Context, req *userPb.SetDefaultStorageConfigRequest) (*userPb.SetDefaultStorageConfigResponse, error)
- func (s *Service) SignMessage(ctx context.Context, req *userPb.SignMessageRequest) (*userPb.SignMessageResponse, error)
- func (s *Service) Stage(srv userPb.UserService_StageServer) error
- func (s *Service) StageCid(ctx context.Context, req *userPb.StageCidRequest) (*userPb.StageCidResponse, error)
- func (s *Service) StorageConfigForJob(ctx context.Context, req *userPb.StorageConfigForJobRequest) (*userPb.StorageConfigForJobResponse, error)
- func (s *Service) StorageDealRecords(ctx context.Context, req *userPb.StorageDealRecordsRequest) (*userPb.StorageDealRecordsResponse, error)
- func (s *Service) StorageJob(ctx context.Context, req *userPb.StorageJobRequest) (*userPb.StorageJobResponse, error)
- func (s *Service) StorageJobsSummary(ctx context.Context, req *userPb.StorageJobsSummaryRequest) (*userPb.StorageJobsSummaryResponse, error)
- func (s *Service) UserIdentifier(ctx context.Context, req *userPb.UserIdentifierRequest) (*userPb.UserIdentifierResponse, error)
- func (s *Service) VerifyMessage(ctx context.Context, req *userPb.VerifyMessageRequest) (*userPb.VerifyMessageResponse, error)
- func (s *Service) WatchLogs(req *userPb.WatchLogsRequest, srv userPb.UserService_WatchLogsServer) error
- func (s *Service) WatchStorageJobs(req *userPb.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) ([]*userPb.StorageJob, error)
ToProtoStorageJobs converts a slice of ffs.StorageJobs to proto Jobs.
func ToRPCStorageConfig ¶
func ToRPCStorageConfig(config ffs.StorageConfig) *userPb.StorageConfig
ToRPCStorageConfig converts from a ffs.StorageConfig to a rpc StorageConfig.
Types ¶
type Service ¶
type Service struct { userPb.UnimplementedUserServiceServer // contains filtered or unexported fields }
Service implements the Powergate API.
func (*Service) Addresses ¶
func (s *Service) Addresses(ctx context.Context, req *userPb.AddressesRequest) (*userPb.AddressesResponse, error)
Addresses calls ffs.Addrs.
func (*Service) ApplyStorageConfig ¶
func (s *Service) ApplyStorageConfig(ctx context.Context, req *userPb.ApplyStorageConfigRequest) (*userPb.ApplyStorageConfigResponse, error)
ApplyStorageConfig applies the provided cid storage config.
func (*Service) Balance ¶
func (s *Service) Balance(ctx context.Context, req *userPb.BalanceRequest) (*userPb.BalanceResponse, error)
Balance returns the balance for an address.
func (*Service) BuildInfo ¶
func (s *Service) BuildInfo(ctx context.Context, req *userPb.BuildInfoRequest) (*userPb.BuildInfoResponse, error)
BuildInfo returns information about the powergate build.
func (*Service) CancelStorageJob ¶
func (s *Service) CancelStorageJob(ctx context.Context, req *userPb.CancelStorageJobRequest) (*userPb.CancelStorageJobResponse, error)
CancelStorageJob calls API.CancelJob.
func (*Service) CidInfo ¶
func (s *Service) CidInfo(ctx context.Context, req *userPb.CidInfoRequest) (*userPb.CidInfoResponse, error)
CidInfo returns information about cids managed by the FFS instance.
func (*Service) DefaultStorageConfig ¶
func (s *Service) DefaultStorageConfig(ctx context.Context, req *userPb.DefaultStorageConfigRequest) (*userPb.DefaultStorageConfigResponse, error)
DefaultStorageConfig calls ffs.DefaultStorageConfig.
func (*Service) ExecutingStorageJobs ¶
func (s *Service) ExecutingStorageJobs(ctx context.Context, req *userPb.ExecutingStorageJobsRequest) (*userPb.ExecutingStorageJobsResponse, error)
ExecutingStorageJobs returns a list of executing storage jobs.
func (*Service) Get ¶
func (s *Service) Get(req *userPb.GetRequest, srv userPb.UserService_GetServer) error
Get gets the data for a stored Cid.
func (*Service) LatestFinalStorageJobs ¶
func (s *Service) LatestFinalStorageJobs(ctx context.Context, req *userPb.LatestFinalStorageJobsRequest) (*userPb.LatestFinalStorageJobsResponse, error)
LatestFinalStorageJobs returns a list of latest final storage jobs.
func (*Service) LatestSuccessfulStorageJobs ¶
func (s *Service) LatestSuccessfulStorageJobs(ctx context.Context, req *userPb.LatestSuccessfulStorageJobsRequest) (*userPb.LatestSuccessfulStorageJobsResponse, error)
LatestSuccessfulStorageJobs returns a list of latest successful storage jobs.
func (*Service) NewAddress ¶
func (s *Service) NewAddress(ctx context.Context, req *userPb.NewAddressRequest) (*userPb.NewAddressResponse, error)
NewAddress calls ffs.NewAddr.
func (*Service) QueuedStorageJobs ¶
func (s *Service) QueuedStorageJobs(ctx context.Context, req *userPb.QueuedStorageJobsRequest) (*userPb.QueuedStorageJobsResponse, error)
QueuedStorageJobs returns a list of queued storage jobs.
func (*Service) Remove ¶
func (s *Service) Remove(ctx context.Context, req *userPb.RemoveRequest) (*userPb.RemoveResponse, error)
Remove calls ffs.Remove.
func (*Service) ReplaceData ¶
func (s *Service) ReplaceData(ctx context.Context, req *userPb.ReplaceDataRequest) (*userPb.ReplaceDataResponse, error)
ReplaceData calls ffs.Replace.
func (*Service) RetrievalDealRecords ¶
func (s *Service) RetrievalDealRecords(ctx context.Context, req *userPb.RetrievalDealRecordsRequest) (*userPb.RetrievalDealRecordsResponse, error)
RetrievalDealRecords calls ffs.ListRetrievalDealRecords.
func (*Service) SendFil ¶
func (s *Service) SendFil(ctx context.Context, req *userPb.SendFilRequest) (*userPb.SendFilResponse, error)
SendFil sends fil from a managed address to any other address.
func (*Service) SetDefaultStorageConfig ¶
func (s *Service) SetDefaultStorageConfig(ctx context.Context, req *userPb.SetDefaultStorageConfigRequest) (*userPb.SetDefaultStorageConfigResponse, error)
SetDefaultStorageConfig sets a new config to be used by default.
func (*Service) SignMessage ¶
func (s *Service) SignMessage(ctx context.Context, req *userPb.SignMessageRequest) (*userPb.SignMessageResponse, error)
SignMessage calls ffs.SignMessage.
func (*Service) Stage ¶
func (s *Service) Stage(srv userPb.UserService_StageServer) error
Stage allows to stage-pin a stream of data in Hot-Storage in preparation for pushing a storage configuration.
func (*Service) StageCid ¶ added in v1.2.2
func (s *Service) StageCid(ctx context.Context, req *userPb.StageCidRequest) (*userPb.StageCidResponse, error)
StageCid allows to stage-pin a cid in Hot-Storage in preparation for pushing a storage configuration.
func (*Service) StorageConfigForJob ¶
func (s *Service) StorageConfigForJob(ctx context.Context, req *userPb.StorageConfigForJobRequest) (*userPb.StorageConfigForJobResponse, error)
StorageConfigForJob returns the StorageConfig associated with the job id.
func (*Service) StorageDealRecords ¶
func (s *Service) StorageDealRecords(ctx context.Context, req *userPb.StorageDealRecordsRequest) (*userPb.StorageDealRecordsResponse, error)
StorageDealRecords calls ffs.ListStorageDealRecords.
func (*Service) StorageJob ¶
func (s *Service) StorageJob(ctx context.Context, req *userPb.StorageJobRequest) (*userPb.StorageJobResponse, error)
StorageJob calls API.GetStorageJob.
func (*Service) StorageJobsSummary ¶
func (s *Service) StorageJobsSummary(ctx context.Context, req *userPb.StorageJobsSummaryRequest) (*userPb.StorageJobsSummaryResponse, error)
StorageJobsSummary returns a summary of all storage jobs.
func (*Service) UserIdentifier ¶
func (s *Service) UserIdentifier(ctx context.Context, req *userPb.UserIdentifierRequest) (*userPb.UserIdentifierResponse, error)
UserIdentifier returns the API instance id.
func (*Service) VerifyMessage ¶
func (s *Service) VerifyMessage(ctx context.Context, req *userPb.VerifyMessageRequest) (*userPb.VerifyMessageResponse, error)
VerifyMessage calls ffs.VerifyMessage.
func (*Service) WatchLogs ¶
func (s *Service) WatchLogs(req *userPb.WatchLogsRequest, srv userPb.UserService_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 *userPb.WatchStorageJobsRequest, srv userPb.UserService_WatchStorageJobsServer) error
WatchStorageJobs calls API.WatchJobs.