Documentation ¶
Overview ¶
contains client to register and interact with a IPFS remote pinning service + with the custom endpoints for file/car upload for supported service TODO: might want to separate out the custom endpoints
Index ¶
- Constants
- type AddOption
- type Client
- func (c *Client) Add(ctx context.Context, cid cid.Cid, opts ...AddOption) (core.PinStatusGetter, error)
- func (c *Client) IsIPFSSupportedFor(ps core.PinningService) bool
- func (c *Client) ServiceType() core.PinningService
- func (c *Client) UploadFile(ctx context.Context, file *os.File) (cid.Cid, error)
- type ClientCreateRequest
- func (r ClientCreateRequest) DelegationProofPath(proofPath string) ClientCreateRequest
- func (r ClientCreateRequest) FilePinBaseUrl(url string) ClientCreateRequest
- func (r ClientCreateRequest) GcEnable(gcEnable bool) ClientCreateRequest
- func (r ClientCreateRequest) HttpClient(client http.Client) ClientCreateRequest
- func (r ClientCreateRequest) PinningServiceBaseUrl(url string) ClientCreateRequest
- func (r ClientCreateRequest) W3AgentDid(did did.DID) ClientCreateRequest
- func (r ClientCreateRequest) W3AgentKey(key string) ClientCreateRequest
- type PinServiceAPI
Constants ¶
View Source
const UserAgent = "ipfs-pinner"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) IsIPFSSupportedFor ¶
func (c *Client) IsIPFSSupportedFor(ps core.PinningService) bool
func (*Client) ServiceType ¶
func (c *Client) ServiceType() core.PinningService
type ClientCreateRequest ¶
type ClientCreateRequest struct { W3_AgentKey string W3_AgentDid did.DID W3_DelegationProofPath string GC_Enable bool // contains filtered or unexported fields }
func NewClientRequest ¶
func NewClientRequest(ps core.PinningService) ClientCreateRequest
func (ClientCreateRequest) DelegationProofPath ¶ added in v1.0.0
func (r ClientCreateRequest) DelegationProofPath(proofPath string) ClientCreateRequest
func (ClientCreateRequest) FilePinBaseUrl ¶
func (r ClientCreateRequest) FilePinBaseUrl(url string) ClientCreateRequest
func (ClientCreateRequest) GcEnable ¶ added in v1.1.0
func (r ClientCreateRequest) GcEnable(gcEnable bool) ClientCreateRequest
func (ClientCreateRequest) HttpClient ¶
func (r ClientCreateRequest) HttpClient(client http.Client) ClientCreateRequest
func (ClientCreateRequest) PinningServiceBaseUrl ¶
func (r ClientCreateRequest) PinningServiceBaseUrl(url string) ClientCreateRequest
func (ClientCreateRequest) W3AgentDid ¶ added in v1.0.0
func (r ClientCreateRequest) W3AgentDid(did did.DID) ClientCreateRequest
func (ClientCreateRequest) W3AgentKey ¶ added in v1.0.0
func (r ClientCreateRequest) W3AgentKey(key string) ClientCreateRequest
type PinServiceAPI ¶
type PinServiceAPI interface { IsIPFSSupportedFor(ps core.PinningService) bool Add(ctx context.Context, cid cid.Cid, opts ...AddOption) (core.PinStatusGetter, error) UploadFile(ctx context.Context, file *os.File) (cid.Cid, error) ServiceType() core.PinningService }
func NewClient ¶
func NewClient(request ClientCreateRequest, cidVersion int, w3up *w3up.W3up) PinServiceAPI
Click to show internal directories.
Click to hide internal directories.