Documentation
¶
Index ¶
- Constants
- type AccountBalanceRequest
- type AccountBalanceResponse
- type AccountCreateRequest
- type AccountCreateResponse
- type AccountExistsRequest
- type AccountExistsResponse
- type AccountFundRequest
- type AccountFundResponse
- type AssetsBalanceRequest
- type AssetsBalanceResponse
- type AvailableAllaccountsBatchRequest
- type BatchManifest
- type BatchManifestAllaccounts
- type BatchManifestAllaccountsResponse
- type BigInt
- type Blockchain
- type Config
- type FxBlockchain
- func (bl *FxBlockchain) AccountBalance(ctx context.Context, to peer.ID, r AccountBalanceRequest) ([]byte, error)
- func (bl *FxBlockchain) AccountCreate(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) AccountExists(ctx context.Context, to peer.ID, r AccountExistsRequest) ([]byte, error)
- func (bl *FxBlockchain) AccountFund(ctx context.Context, to peer.ID, r AccountFundRequest) ([]byte, error)
- func (bl *FxBlockchain) AssetsBalance(ctx context.Context, to peer.ID, r AssetsBalanceRequest) ([]byte, error)
- func (bl *FxBlockchain) BloxFreeSpace(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) DeleteFulaConfig(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) DeleteWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
- func (bl *FxBlockchain) DisconnectWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
- func (bl *FxBlockchain) EraseBlData(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) FetchContainerLogs(ctx context.Context, to peer.ID, r wifi.FetchContainerLogsRequest) ([]byte, error)
- func (bl *FxBlockchain) FetchUsersAndPopulateSets(ctx context.Context, topicString string, initiate bool, timeout time.Duration) error
- func (bl *FxBlockchain) FindBestAndTargetInLogs(ctx context.Context, to peer.ID, r wifi.FindBestAndTargetInLogsRequest) ([]byte, error)
- func (bl *FxBlockchain) GetAccount(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) GetDatastoreSize(ctx context.Context, to peer.ID, r wifi.GetDatastoreSizeRequest) ([]byte, error)
- func (bl *FxBlockchain) GetFolderSize(ctx context.Context, to peer.ID, r wifi.GetFolderSizeRequest) ([]byte, error)
- func (bl *FxBlockchain) GetMemberStatus(id peer.ID) (common.MemberStatus, bool)
- func (bl *FxBlockchain) GetMembers() map[peer.ID]common.MemberStatus
- func (bl *FxBlockchain) HandleGetAccount(ctx context.Context, from peer.ID, w http.ResponseWriter, r *http.Request)
- func (bl *FxBlockchain) HandleManifestAvailableAllaccountsBatch(ctx context.Context, poolIDString string, links []ipld.Link) ([]ipld.Link, error)
- func (bl *FxBlockchain) HandleManifestBatchStore(ctx context.Context, poolIDString string, links []ipld.Link) ([]string, error)
- func (bl *FxBlockchain) HandleManifestsAvailable(ctx context.Context, poolIDString string, limit int) ([]LinkWithLimit, error)
- func (bl *FxBlockchain) HandlePoolCancelJoin(method string, action string, from peer.ID, w http.ResponseWriter, ...)
- func (bl *FxBlockchain) HandlePoolJoin(method string, action string, from peer.ID, w http.ResponseWriter, ...)
- func (bl *FxBlockchain) HandlePoolJoinRequest(ctx context.Context, from peer.ID, account string, topicString string, ...) error
- func (bl *FxBlockchain) HandlePoolList(ctx context.Context) (PoolListResponse, error)
- func (bl *FxBlockchain) HandleSeeded(ctx context.Context, req *SeededRequest) (string, error)
- func (bl *FxBlockchain) IsMembersEmpty() bool
- func (bl *FxBlockchain) ManifestAvailable(ctx context.Context, to peer.ID, r ManifestAvailableRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestBatchStore(ctx context.Context, to peer.ID, r ManifestBatchStoreRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestBatchUpload(ctx context.Context, to peer.ID, r ManifestBatchUploadMobileRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestRemove(ctx context.Context, to peer.ID, r ManifestRemoveRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestRemoveStored(ctx context.Context, to peer.ID, r ManifestRemoveStoredRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestRemoveStorer(ctx context.Context, to peer.ID, r ManifestRemoveStorerRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestStore(ctx context.Context, to peer.ID, r ManifestStoreRequest) ([]byte, error)
- func (bl *FxBlockchain) ManifestUpload(ctx context.Context, to peer.ID, r ManifestUploadRequest) ([]byte, error)
- func (bl *FxBlockchain) Partition(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) PlugSeedIfNeeded(ctx context.Context, action string, req interface{}) interface{}
- func (bl *FxBlockchain) PoolCancelJoin(ctx context.Context, to peer.ID, r PoolCancelJoinRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolCreate(ctx context.Context, to peer.ID, r PoolCreateRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolJoin(ctx context.Context, to peer.ID, r PoolJoinRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolLeave(ctx context.Context, to peer.ID, r PoolLeaveRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolList(ctx context.Context, to peer.ID, r PoolListRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolRequests(ctx context.Context, to peer.ID, r PoolRequestsRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolUserList(ctx context.Context, to peer.ID, r PoolUserListRequest) ([]byte, error)
- func (bl *FxBlockchain) PoolVote(ctx context.Context, to peer.ID, r PoolVoteRequest) ([]byte, error)
- func (bl *FxBlockchain) Reboot(ctx context.Context, to peer.ID) ([]byte, error)
- func (bl *FxBlockchain) ReplicateInPool(ctx context.Context, to peer.ID, r ReplicateRequest) ([]byte, error)
- func (bl *FxBlockchain) Seeded(ctx context.Context, to peer.ID, r SeededRequest) ([]byte, error)
- func (bl *FxBlockchain) SetAuth(ctx context.Context, on peer.ID, subject peer.ID, allow bool) error
- func (bl *FxBlockchain) Shutdown(ctx context.Context) error
- func (bl *FxBlockchain) Start(ctx context.Context) error
- func (bl *FxBlockchain) StartPingServer(ctx context.Context) error
- func (bl *FxBlockchain) StopPingServer(ctx context.Context) error
- func (bl *FxBlockchain) TransferToFula(ctx context.Context, to peer.ID, r TransferToFulaRequest) ([]byte, error)
- func (bl *FxBlockchain) WifiRemoveall(ctx context.Context, to peer.ID) ([]byte, error)
- type GetAccountRequest
- type GetAccountResponse
- type KeyStorer
- type LinkWithLimit
- type Manifest
- type ManifestAvailableRequest
- type ManifestAvailableResponse
- type ManifestBatchStoreRequest
- type ManifestBatchStoreResponse
- type ManifestBatchUploadMobileRequest
- type ManifestBatchUploadRequest
- type ManifestBatchUploadResponse
- type ManifestData
- type ManifestJob
- type ManifestMetadata
- type ManifestRemoveRequest
- type ManifestRemoveResponse
- type ManifestRemoveStoredRequest
- type ManifestRemoveStoredResponse
- type ManifestRemoveStorerRequest
- type ManifestRemoveStorerResponse
- type ManifestStoreRequest
- type ManifestStoreResponse
- type ManifestUploadRequest
- type ManifestUploadResponse
- type MobileAssetsBalanceResponse
- type Option
- func WithAllowTransientConnection(t bool) Option
- func WithAuthorizedPeers(l []peer.ID) Option
- func WithAuthorizer(a peer.ID) Option
- func WithBlockchainEndPoint(b string) Option
- func WithFetchFrequency(t time.Duration) Option
- func WithGetPoolName(getPoolName func() string) Option
- func WithIpfsClient(n *rpc.HttpApi) Option
- func WithIpfsClusterAPI(n ipfsCluster.Client) Option
- func WithMaxPingTime(t int) Option
- func WithMinSuccessPingCount(sr int) Option
- func WithRelays(r []string) Option
- func WithSecretsPath(b string) Option
- func WithTimeout(to int) Option
- func WithTopicName(n string) Option
- func WithUpdatePoolName(updatePoolName func(string) error) Option
- func WithWg(wg *sync.WaitGroup) Option
- type PingResponse
- type Pool
- type PoolCancelJoinRequest
- type PoolCancelJoinResponse
- type PoolCreateRequest
- type PoolCreateResponse
- type PoolJoinRequest
- type PoolJoinResponse
- type PoolLeaveRequest
- type PoolLeaveResponse
- type PoolListRequest
- type PoolListRequestWithPoolId
- type PoolListResponse
- type PoolRequest
- type PoolRequestsRequest
- type PoolRequestsResponse
- type PoolUserListRequest
- type PoolUserListResponse
- type PoolVoteRequest
- type PoolVoteResponse
- type ReplicateRequest
- type ReplicateResponse
- type SeededRequest
- type SeededResponse
- type SimpleKeyStorer
- type TransferToFulaRequest
- type TransferToFulaResponse
- type User
Constants ¶
View Source
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
View Source
const (
FxBlockchainProtocolID = "/fx.land/blockchain/0.0.1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalanceRequest ¶
type AccountBalanceRequest struct {
Account string `json:"account"`
}
type AccountBalanceResponse ¶
type AccountBalanceResponse struct {
Amount string `json:"amount"`
}
type AccountCreateRequest ¶
type AccountCreateRequest struct {
Account string `json:"account"`
}
type AccountCreateResponse ¶
type AccountCreateResponse struct {
Account string `json:"account"`
}
type AccountExistsRequest ¶
type AccountExistsRequest struct {
Account string `json:"account"`
}
type AccountExistsResponse ¶
type AccountFundRequest ¶
type AccountFundResponse ¶
type AssetsBalanceRequest ¶ added in v1.18.0
type AssetsBalanceResponse ¶ added in v1.18.0
type AssetsBalanceResponse struct {
Amount uint64 `json:"amount"`
}
type AvailableAllaccountsBatchRequest ¶ added in v1.54.9
type BatchManifest ¶ added in v1.53.0
type BatchManifestAllaccounts ¶ added in v1.54.9
type BatchManifestAllaccounts struct {
Cid string `json:"cid"`
}
type BatchManifestAllaccountsResponse ¶ added in v1.54.9
type BatchManifestAllaccountsResponse struct {
Manifests []BatchManifestAllaccounts `json:"manifests"`
}
type Blockchain ¶
type Blockchain interface {
Seeded(context.Context, peer.ID, SeededRequest) ([]byte, error)
AccountExists(context.Context, peer.ID, AccountExistsRequest) ([]byte, error)
AccountCreate(context.Context, peer.ID) ([]byte, error)
AccountFund(context.Context, peer.ID, AccountFundRequest) ([]byte, error)
AccountBalance(context.Context, peer.ID, AccountBalanceRequest) ([]byte, error)
AssetsBalance(context.Context, peer.ID, AssetsBalanceRequest) ([]byte, error)
TransferToFula(context.Context, peer.ID, TransferToFulaRequest) ([]byte, error)
PoolCreate(context.Context, peer.ID, PoolCreateRequest) ([]byte, error)
PoolJoin(context.Context, peer.ID, PoolJoinRequest) ([]byte, error)
PoolCancelJoin(context.Context, peer.ID, PoolCancelJoinRequest) ([]byte, error)
PoolRequests(context.Context, peer.ID, PoolRequestsRequest) ([]byte, error)
PoolList(context.Context, peer.ID, PoolListRequest) ([]byte, error)
PoolUserList(context.Context, peer.ID, PoolUserListRequest) ([]byte, error)
PoolVote(context.Context, peer.ID, PoolVoteRequest) ([]byte, error)
PoolLeave(context.Context, peer.ID, PoolLeaveRequest) ([]byte, error)
ManifestUpload(context.Context, peer.ID, ManifestUploadRequest) ([]byte, error)
ManifestBatchStore(context.Context, peer.ID, ManifestBatchStoreRequest) ([]byte, error)
ManifestBatchUpload(context.Context, peer.ID, ManifestBatchUploadMobileRequest) ([]byte, error)
ReplicateInPool(context.Context, peer.ID, ReplicateRequest) ([]byte, error)
ManifestStore(context.Context, peer.ID, ManifestStoreRequest) ([]byte, error)
ManifestAvailable(context.Context, peer.ID, ManifestAvailableRequest) ([]byte, error)
ManifestRemove(context.Context, peer.ID, ManifestRemoveRequest) ([]byte, error)
ManifestRemoveStorer(context.Context, peer.ID, ManifestRemoveStorerRequest) ([]byte, error)
ManifestRemoveStored(context.Context, peer.ID, ManifestRemoveStoredRequest) ([]byte, error)
SetAuth(context.Context, peer.ID, peer.ID, bool) error
//Hardware
BloxFreeSpace(context.Context, peer.ID) ([]byte, error)
EraseBlData(context.Context, peer.ID) ([]byte, error)
WifiRemoveall(context.Context, peer.ID) ([]byte, error)
Reboot(context.Context, peer.ID) ([]byte, error)
DeleteWifi(context.Context, peer.ID, wifi.DeleteWifiRequest) ([]byte, error)
DisconnectWifi(context.Context, peer.ID, wifi.DeleteWifiRequest) ([]byte, error)
Partition(context.Context, peer.ID) ([]byte, error)
DeleteFulaConfig(context.Context, peer.ID) ([]byte, error)
GetAccount(context.Context, peer.ID) ([]byte, error)
FetchContainerLogs(context.Context, peer.ID, wifi.FetchContainerLogsRequest) ([]byte, error)
FindBestAndTargetInLogs(context.Context, peer.ID, wifi.FindBestAndTargetInLogsRequest) ([]byte, error)
GetFolderSize(context.Context, peer.ID, wifi.GetFolderSizeRequest) ([]byte, error)
GetDatastoreSize(context.Context, peer.ID, wifi.GetDatastoreSizeRequest) ([]byte, error)
}
type FxBlockchain ¶
type FxBlockchain struct {
// contains filtered or unexported fields
}
func NewFxBlockchain ¶
func NewFxBlockchain(h host.Host, p *ping.FxPing, a *announcements.FxAnnouncements, keyStorer KeyStorer, o ...Option) (*FxBlockchain, error)
func (*FxBlockchain) AccountBalance ¶
func (bl *FxBlockchain) AccountBalance(ctx context.Context, to peer.ID, r AccountBalanceRequest) ([]byte, error)
func (*FxBlockchain) AccountCreate ¶
func (*FxBlockchain) AccountExists ¶
func (bl *FxBlockchain) AccountExists(ctx context.Context, to peer.ID, r AccountExistsRequest) ([]byte, error)
func (*FxBlockchain) AccountFund ¶
func (bl *FxBlockchain) AccountFund(ctx context.Context, to peer.ID, r AccountFundRequest) ([]byte, error)
func (*FxBlockchain) AssetsBalance ¶ added in v1.18.0
func (bl *FxBlockchain) AssetsBalance(ctx context.Context, to peer.ID, r AssetsBalanceRequest) ([]byte, error)
func (*FxBlockchain) BloxFreeSpace ¶
func (*FxBlockchain) DeleteFulaConfig ¶ added in v1.14.0
func (*FxBlockchain) DeleteWifi ¶ added in v1.17.0
func (bl *FxBlockchain) DeleteWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
func (*FxBlockchain) DisconnectWifi ¶ added in v1.17.0
func (bl *FxBlockchain) DisconnectWifi(ctx context.Context, to peer.ID, r wifi.DeleteWifiRequest) ([]byte, error)
func (*FxBlockchain) EraseBlData ¶ added in v1.30.0
func (*FxBlockchain) FetchContainerLogs ¶ added in v1.44.0
func (bl *FxBlockchain) FetchContainerLogs(ctx context.Context, to peer.ID, r wifi.FetchContainerLogsRequest) ([]byte, error)
func (*FxBlockchain) FetchUsersAndPopulateSets ¶ added in v1.15.0
func (*FxBlockchain) FindBestAndTargetInLogs ¶ added in v1.54.9
func (bl *FxBlockchain) FindBestAndTargetInLogs(ctx context.Context, to peer.ID, r wifi.FindBestAndTargetInLogsRequest) ([]byte, error)
func (*FxBlockchain) GetAccount ¶ added in v1.18.0
func (*FxBlockchain) GetDatastoreSize ¶ added in v1.48.0
func (bl *FxBlockchain) GetDatastoreSize(ctx context.Context, to peer.ID, r wifi.GetDatastoreSizeRequest) ([]byte, error)
func (*FxBlockchain) GetFolderSize ¶ added in v1.45.0
func (bl *FxBlockchain) GetFolderSize(ctx context.Context, to peer.ID, r wifi.GetFolderSizeRequest) ([]byte, error)
func (*FxBlockchain) GetMemberStatus ¶ added in v1.15.0
func (bl *FxBlockchain) GetMemberStatus(id peer.ID) (common.MemberStatus, bool)
func (*FxBlockchain) GetMembers ¶ added in v1.15.0
func (bl *FxBlockchain) GetMembers() map[peer.ID]common.MemberStatus
func (*FxBlockchain) HandleGetAccount ¶ added in v1.18.0
func (bl *FxBlockchain) HandleGetAccount(ctx context.Context, from peer.ID, w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandleManifestAvailableAllaccountsBatch ¶ added in v1.54.9
func (*FxBlockchain) HandleManifestBatchStore ¶ added in v1.16.0
func (*FxBlockchain) HandleManifestsAvailable ¶ added in v1.16.0
func (bl *FxBlockchain) HandleManifestsAvailable(ctx context.Context, poolIDString string, limit int) ([]LinkWithLimit, error)
func (*FxBlockchain) HandlePoolCancelJoin ¶ added in v1.41.0
func (bl *FxBlockchain) HandlePoolCancelJoin(method string, action string, from peer.ID, w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandlePoolJoin ¶ added in v1.41.0
func (bl *FxBlockchain) HandlePoolJoin(method string, action string, from peer.ID, w http.ResponseWriter, r *http.Request)
func (*FxBlockchain) HandlePoolJoinRequest ¶ added in v1.15.0
func (*FxBlockchain) HandlePoolList ¶ added in v1.54.8
func (bl *FxBlockchain) HandlePoolList(ctx context.Context) (PoolListResponse, error)
func (*FxBlockchain) HandleSeeded ¶ added in v1.18.0
func (bl *FxBlockchain) HandleSeeded(ctx context.Context, req *SeededRequest) (string, error)
func (*FxBlockchain) IsMembersEmpty ¶ added in v1.15.0
func (bl *FxBlockchain) IsMembersEmpty() bool
func (*FxBlockchain) ManifestAvailable ¶
func (bl *FxBlockchain) ManifestAvailable(ctx context.Context, to peer.ID, r ManifestAvailableRequest) ([]byte, error)
func (*FxBlockchain) ManifestBatchStore ¶ added in v1.53.0
func (bl *FxBlockchain) ManifestBatchStore(ctx context.Context, to peer.ID, r ManifestBatchStoreRequest) ([]byte, error)
func (*FxBlockchain) ManifestBatchUpload ¶ added in v1.53.0
func (bl *FxBlockchain) ManifestBatchUpload(ctx context.Context, to peer.ID, r ManifestBatchUploadMobileRequest) ([]byte, error)
func (*FxBlockchain) ManifestRemove ¶
func (bl *FxBlockchain) ManifestRemove(ctx context.Context, to peer.ID, r ManifestRemoveRequest) ([]byte, error)
func (*FxBlockchain) ManifestRemoveStored ¶
func (bl *FxBlockchain) ManifestRemoveStored(ctx context.Context, to peer.ID, r ManifestRemoveStoredRequest) ([]byte, error)
func (*FxBlockchain) ManifestRemoveStorer ¶
func (bl *FxBlockchain) ManifestRemoveStorer(ctx context.Context, to peer.ID, r ManifestRemoveStorerRequest) ([]byte, error)
func (*FxBlockchain) ManifestStore ¶
func (bl *FxBlockchain) ManifestStore(ctx context.Context, to peer.ID, r ManifestStoreRequest) ([]byte, error)
func (*FxBlockchain) ManifestUpload ¶
func (bl *FxBlockchain) ManifestUpload(ctx context.Context, to peer.ID, r ManifestUploadRequest) ([]byte, error)
func (*FxBlockchain) PlugSeedIfNeeded ¶
func (bl *FxBlockchain) PlugSeedIfNeeded(ctx context.Context, action string, req interface{}) interface{}
func (*FxBlockchain) PoolCancelJoin ¶
func (bl *FxBlockchain) PoolCancelJoin(ctx context.Context, to peer.ID, r PoolCancelJoinRequest) ([]byte, error)
func (*FxBlockchain) PoolCreate ¶
func (bl *FxBlockchain) PoolCreate(ctx context.Context, to peer.ID, r PoolCreateRequest) ([]byte, error)
func (*FxBlockchain) PoolJoin ¶
func (bl *FxBlockchain) PoolJoin(ctx context.Context, to peer.ID, r PoolJoinRequest) ([]byte, error)
func (*FxBlockchain) PoolLeave ¶
func (bl *FxBlockchain) PoolLeave(ctx context.Context, to peer.ID, r PoolLeaveRequest) ([]byte, error)
func (*FxBlockchain) PoolList ¶
func (bl *FxBlockchain) PoolList(ctx context.Context, to peer.ID, r PoolListRequest) ([]byte, error)
func (*FxBlockchain) PoolRequests ¶
func (bl *FxBlockchain) PoolRequests(ctx context.Context, to peer.ID, r PoolRequestsRequest) ([]byte, error)
func (*FxBlockchain) PoolUserList ¶
func (bl *FxBlockchain) PoolUserList(ctx context.Context, to peer.ID, r PoolUserListRequest) ([]byte, error)
func (*FxBlockchain) PoolVote ¶
func (bl *FxBlockchain) PoolVote(ctx context.Context, to peer.ID, r PoolVoteRequest) ([]byte, error)
func (*FxBlockchain) ReplicateInPool ¶ added in v1.53.0
func (bl *FxBlockchain) ReplicateInPool(ctx context.Context, to peer.ID, r ReplicateRequest) ([]byte, error)
func (*FxBlockchain) Seeded ¶
func (bl *FxBlockchain) Seeded(ctx context.Context, to peer.ID, r SeededRequest) ([]byte, error)
func (*FxBlockchain) StartPingServer ¶ added in v1.15.0
func (bl *FxBlockchain) StartPingServer(ctx context.Context) error
func (*FxBlockchain) StopPingServer ¶ added in v1.15.0
func (bl *FxBlockchain) StopPingServer(ctx context.Context) error
func (*FxBlockchain) TransferToFula ¶ added in v1.33.0
func (bl *FxBlockchain) TransferToFula(ctx context.Context, to peer.ID, r TransferToFulaRequest) ([]byte, error)
func (*FxBlockchain) WifiRemoveall ¶ added in v1.0.0
type GetAccountRequest ¶ added in v1.18.0
type GetAccountRequest struct {
}
type GetAccountResponse ¶ added in v1.18.0
type GetAccountResponse struct {
Account string `json:"account"`
}
type KeyStorer ¶
type KeyStorer interface {
SaveKey(ctx context.Context, key string) error
LoadKey(ctx context.Context) (string, error)
}
Implementations for this interface should be responsible for saving/loading a single key.
type LinkWithLimit ¶ added in v1.16.0
type Manifest ¶
type Manifest struct {
PoolID int `json:"pool_id"`
ReplicationAvailable int `json:"replication_available"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
}
type ManifestAvailableRequest ¶
type ManifestAvailableRequest struct {
PoolID int `json:"pool_id"`
}
type ManifestAvailableResponse ¶
type ManifestAvailableResponse struct {
Manifests []Manifest `json:"manifests"`
}
type ManifestBatchStoreRequest ¶ added in v1.16.0
type ManifestBatchStoreResponse ¶ added in v1.16.0
type ManifestBatchUploadMobileRequest ¶ added in v1.53.0
type ManifestBatchUploadRequest ¶ added in v1.53.0
type ManifestBatchUploadRequest struct {
Cid []string `json:"cid"`
PoolID int `json:"pool_id"`
ReplicationFactor []int `json:"replication_factor"`
ManifestMetadata []ManifestMetadata `json:"manifest_metadata"`
}
type ManifestBatchUploadResponse ¶ added in v1.53.0
type ManifestData ¶
type ManifestData struct {
Uploader string `json:"uploader"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
}
type ManifestJob ¶
type ManifestMetadata ¶
type ManifestMetadata struct {
Job ManifestJob `json:"job"`
}
type ManifestRemoveRequest ¶
type ManifestRemoveResponse ¶
type ManifestStoreRequest ¶
type ManifestStoreResponse ¶
type ManifestUploadRequest ¶
type ManifestUploadRequest struct {
PoolID int `json:"pool_id"`
ReplicationFactor int `json:"replication_factor"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
Cid string `json:"cid"`
}
type ManifestUploadResponse ¶
type ManifestUploadResponse struct {
Uploader string `json:"uploader"`
Storage []string `json:"storage"`
ManifestMetadata ManifestMetadata `json:"manifest_metadata"`
PoolID int `json:"pool_id"`
}
type MobileAssetsBalanceResponse ¶ added in v1.54.8
type MobileAssetsBalanceResponse struct {
Amount string `json:"amount"`
}
type Option ¶
type Option func(*options) error
func WithAuthorizedPeers ¶ added in v1.14.0
func WithAuthorizer ¶
func WithBlockchainEndPoint ¶
func WithFetchFrequency ¶ added in v1.15.0
func WithGetPoolName ¶ added in v1.54.8
func WithIpfsClient ¶ added in v1.48.0
func WithIpfsClusterAPI ¶ added in v1.53.0
func WithIpfsClusterAPI(n ipfsCluster.Client) Option
func WithMaxPingTime ¶ added in v1.15.0
func WithMinSuccessPingCount ¶ added in v1.15.0
func WithRelays ¶ added in v1.15.0
WithStoreDir sets a the store directory we are using for datastore Required.
func WithSecretsPath ¶ added in v1.41.0
func WithTimeout ¶
func WithTopicName ¶ added in v1.15.0
func WithUpdatePoolName ¶ added in v1.15.0
type PingResponse ¶ added in v1.53.0
type PoolCancelJoinRequest ¶
type PoolCancelJoinRequest struct {
PoolID int `json:"pool_id"`
}
type PoolCancelJoinResponse ¶
type PoolCreateRequest ¶
type PoolCreateResponse ¶
type PoolJoinRequest ¶
type PoolJoinResponse ¶
type PoolLeaveRequest ¶
type PoolLeaveRequest struct {
PoolID int `json:"pool_id"`
}
type PoolLeaveResponse ¶
type PoolListRequest ¶
type PoolListRequest struct {
}
type PoolListRequestWithPoolId ¶ added in v1.53.0
type PoolListRequestWithPoolId struct {
PoolID int `json:"pool_id"`
}
type PoolListResponse ¶
type PoolListResponse struct {
Pools []Pool `json:"pools"`
}
type PoolRequest ¶
type PoolRequestsRequest ¶
type PoolRequestsRequest struct {
PoolID int `json:"pool_id"`
}
type PoolRequestsResponse ¶
type PoolRequestsResponse struct {
PoolRequests []PoolRequest `json:"poolrequests"`
}
type PoolUserListRequest ¶
type PoolUserListResponse ¶
type PoolUserListResponse struct {
Users []User `json:"users"`
}
type PoolVoteRequest ¶
type PoolVoteResponse ¶
type ReplicateRequest ¶ added in v1.53.0
type ReplicateResponse ¶ added in v1.53.0
type ReplicateResponse struct {
Manifests []BatchManifest `json:"manifests"`
}
type SeededRequest ¶
type SeededRequest struct {
}
type SeededResponse ¶
type SimpleKeyStorer ¶
type SimpleKeyStorer struct {
// contains filtered or unexported fields
}
func NewSimpleKeyStorer ¶
func NewSimpleKeyStorer(dbPath string) *SimpleKeyStorer
type TransferToFulaRequest ¶ added in v1.33.0
type TransferToFulaResponse ¶ added in v1.33.0
Click to show internal directories.
Click to hide internal directories.