Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultNetwork = Networks[0]
View Source
var Networks = []NetworkConfig{ { Name: "forge", UploadID: forgeUploadID, UploadURL: *forgeUploadURL, ReceiptsURL: *forgeReceiptsURL, IndexerID: forgeIndexerID, IndexerURL: *forgeIndexerURL, AuthorizedRetrievals: true, }, { Name: "hot", UploadID: hotUploadID, UploadURL: *hotUploadURL, ReceiptsURL: *hotReceiptsURL, IndexerID: hotIndexerID, IndexerURL: *hotIndexerURL, AuthorizedRetrievals: false, }, { Name: "warm-staging", UploadID: warmStagingUploadID, UploadURL: *warmStagingUploadURL, ReceiptsURL: *warmStagingReceiptsURL, IndexerID: warmStagingIndexerID, IndexerURL: *warmStagingIndexerURL, AuthorizedRetrievals: true, }, }
Known network configurations.
Functions ¶
This section is empty.
Types ¶
type NetworkConfig ¶
type NetworkConfig struct {
Name string // Name of the network.
IndexerID did.DID
IndexerURL url.URL
ReceiptsURL url.URL
UploadID did.DID
UploadURL url.URL
AuthorizedRetrievals bool // Support for UCAN authorized retrievals.
}
func GetNetworkConfig ¶
func GetNetworkConfig(name string) (NetworkConfig, error)
GetNetworkConfig returns the network config for the passed name or the STORACHA_NETWORK environment variable if set. If both are empty, the default network configuration is returned with overrides from the following environment variables:
- STORACHA_SERVICE_DID: override the upload service DID
- STORACHA_SERVICE_URL: override the upload service URL
- STORACHA_RECEIPTS_URL: override the receipts service URL
- STORACHA_INDEXING_SERVICE_DID: override the indexing service DID
- STORACHA_INDEXING_SERVICE_URL: override the indexing service URL
- STORACHA_AUTHORIZED_RETRIEVALS: set authorized retrievals to true if "true"
Click to show internal directories.
Click to hide internal directories.