Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuildVersion = "dev" BuildCommit = "" BuildTime = "" )
Build info (set via -ldflags at build time; defaults for dev)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ListenAddr string
ClientNamespace string
BootstrapPeers []string
// Optional DSN for rqlite database/sql driver, e.g. "http://localhost:4001"
// If empty, defaults to "http://localhost:4001".
RQLiteDSN string
// HTTPS configuration
EnableHTTPS bool // Enable HTTPS with ACME (Let's Encrypt)
DomainName string // Domain name for HTTPS certificate
TLSCacheDir string // Directory to cache TLS certificates (default: ~/.debros/tls-cache)
// Olric cache configuration
OlricServers []string // List of Olric server addresses (e.g., ["localhost:3320"]). If empty, defaults to ["localhost:3320"]
OlricTimeout time.Duration // Timeout for Olric operations (default: 10s)
// IPFS Cluster configuration
IPFSClusterAPIURL string // IPFS Cluster HTTP API URL (e.g., "http://localhost:9094"). If empty, gateway will discover from node configs
IPFSAPIURL string // IPFS HTTP API URL for content retrieval (e.g., "http://localhost:5001"). If empty, gateway will discover from node configs
IPFSTimeout time.Duration // Timeout for IPFS operations (default: 60s)
IPFSReplicationFactor int // Replication factor for pins (default: 3)
IPFSEnableEncryption bool // Enable client-side encryption before upload (default: true, discovered from node configs)
}
Config holds configuration for the gateway server
func (*Config) ValidateConfig ¶ added in v0.51.5
ValidateConfig performs comprehensive validation of gateway configuration. It returns aggregated errors, allowing the caller to print all issues at once.
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
type StoragePinRequest ¶ added in v0.69.13
StoragePinRequest represents a request to pin a CID
type StoragePinResponse ¶ added in v0.69.13
StoragePinResponse represents the response from pinning a CID
type StorageStatusResponse ¶ added in v0.69.13
type StorageStatusResponse struct {
Cid string `json:"cid"`
Name string `json:"name"`
Status string `json:"status"`
ReplicationMin int `json:"replication_min"`
ReplicationMax int `json:"replication_max"`
ReplicationFactor int `json:"replication_factor"`
Peers []string `json:"peers"`
Error string `json:"error,omitempty"`
}
StorageStatusResponse represents the status of a pinned CID
type StorageUploadRequest ¶ added in v0.69.13
type StorageUploadRequest struct {
Name string `json:"name,omitempty"`
Data string `json:"data,omitempty"` // Base64 encoded data (alternative to multipart)
}
StorageUploadRequest represents a request to upload content to IPFS
type StorageUploadResponse ¶ added in v0.69.13
type StorageUploadResponse struct {
Cid string `json:"cid"`
Name string `json:"name"`
Size int64 `json:"size"`
}
StorageUploadResponse represents the response from uploading content
Click to show internal directories.
Click to hide internal directories.