presets

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: Apache-2.0, MIT Imports: 5 Imported by: 0

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"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL