-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
48 lines (48 loc) · 1.46 KB
/
doc.go
File metadata and controls
48 lines (48 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Package ipfs provides a Go SDK for interacting with IPFS HTTP gateway services.
//
// This SDK offers a comprehensive client for common IPFS operations including:
// - Pinning: Pin and unpin content using IPFS Pinning Service API
// - DNS: Manage DNSLink records for IPNS
// - IPNS: Interact with InterPlanetary Naming System
// - Websites: Deploy and manage website content
// - Upload: Upload content via TUS resumable upload protocol
//
// Getting Started
//
// Create a new client with the gateway URL and authentication token:
//
// client := NewClient("https://api.example.com", "your-token-here")
//
// Services
//
// The client provides access to specialized services:
//
// client := NewClient(baseURL, token)
// pinningClient := client.Pinning()
// dnsClient := client.DNS()
// ipnsClient := client.Ipns()
// websitesClient := client.Websites()
// uploadClient := client.Upload()
//
// Configuration
//
// The client supports configurable retry behavior:
//
// cfg := DefaultClientConfig()
// cfg.Retry.MaxAttempts = 5
// cfg.Retry.BaseDelay = 100 * time.Millisecond
// client := NewClient(baseURL, token, WithRetryConfig(cfg))
//
// Error Handling
//
// The SDK returns standard Go errors. Check for context cancellation when using
// operations with context:
//
// ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
// defer cancel()
//
// pins, err := client.Pinning().ListPins(ctx)
// if err != nil {
// // handle error
// }
package ipfs