Documentation
¶
Index ¶
- func Load[T Validatable]() (T, error)
- type API
- type Client
- type EgressTrackerServiceConfig
- type FullServerConfig
- type IdentityConfig
- type IndexingServiceConfig
- type LocalConfig
- type PDPServiceConfig
- type PublisherServiceConfig
- type RepoConfig
- type ServerConfig
- type ServicesConfig
- type SigningServiceConfig
- type UCANServerConfig
- type UCANServiceConfig
- type UploadServiceConfig
- type Validatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load[T Validatable]() (T, error)
Types ¶
type API ¶ added in v0.0.13
type API struct {
// The URL of the node to establish an API connection with
Endpoint string `mapstructure:"endpoint" validate:"required" flag:"node-url"`
}
type Client ¶ added in v0.0.13
type Client struct {
Identity IdentityConfig `mapstructure:"identity"`
API API `mapstructure:"api"`
UCANService UCANServiceConfig `mapstructure:"ucan" toml:"ucan"`
}
type EgressTrackerServiceConfig ¶ added in v0.0.15
type EgressTrackerServiceConfig struct {
DID string `mapstructure:"did" flag:"egress-tracker-service-did" toml:"did,omitempty"`
URL string `mapstructure:"url" flag:"egress-tracker-service-url" toml:"url,omitempty"`
ReceiptsEndpoint string `mapstructure:"receipts_endpoint" flag:"egress-tracker-service-receipts-endpoint" toml:"receipts_endpoint,omitempty"`
// According to the spec, batch size should be between 10MiB and 1GiB
// (see https://github.com/storacha/specs/blob/main/w3-egress-tracking.md)
MaxBatchSizeBytes int64 `` /* 156-byte string literal not displayed */
Proof string `mapstructure:"proof" flag:"egress-tracker-service-proof" toml:"proof,omitempty"`
}
func (*EgressTrackerServiceConfig) ToAppConfig ¶ added in v0.0.15
func (c *EgressTrackerServiceConfig) ToAppConfig() (app.EgressTrackerServiceConfig, error)
func (*EgressTrackerServiceConfig) Validate ¶ added in v0.0.15
func (c *EgressTrackerServiceConfig) Validate() error
type FullServerConfig ¶ added in v0.0.13
type FullServerConfig struct {
Identity IdentityConfig `mapstructure:"identity" toml:"identity"`
Repo RepoConfig `mapstructure:"repo" toml:"repo"`
Server ServerConfig `mapstructure:"server" toml:"server"`
PDPService PDPServiceConfig `mapstructure:"pdp" toml:"pdp"`
UCANService UCANServiceConfig `mapstructure:"ucan" toml:"ucan"`
}
func (FullServerConfig) ToAppConfig ¶ added in v0.0.13
func (f FullServerConfig) ToAppConfig() (app.AppConfig, error)
func (FullServerConfig) Validate ¶ added in v0.0.13
func (f FullServerConfig) Validate() error
type IdentityConfig ¶ added in v0.0.13
type IdentityConfig struct {
KeyFile string `mapstructure:"key_file" validate:"required" flag:"key-file" toml:"key_file"`
}
func (IdentityConfig) ToAppConfig ¶ added in v0.0.13
func (i IdentityConfig) ToAppConfig() (app.IdentityConfig, error)
func (IdentityConfig) Validate ¶ added in v0.0.13
func (i IdentityConfig) Validate() error
type IndexingServiceConfig ¶ added in v0.0.13
type IndexingServiceConfig struct {
DID string `mapstructure:"did" validate:"required" flag:"indexing-service-did" toml:"did,omitempty"`
URL string `mapstructure:"url" validate:"required,url" flag:"indexing-service-url" toml:"url,omitempty"`
Proof string `mapstructure:"proof" flag:"indexing-service-proof" toml:"proof,omitempty"`
}
func (*IndexingServiceConfig) ToAppConfig ¶ added in v0.0.13
func (s *IndexingServiceConfig) ToAppConfig() (app.IndexingServiceConfig, error)
func (*IndexingServiceConfig) Validate ¶ added in v0.0.13
func (s *IndexingServiceConfig) Validate() error
type LocalConfig ¶ added in v0.0.13
type LocalConfig struct {
Repo RepoConfig `mapstructure:"repo"`
}
func (LocalConfig) Validate ¶ added in v0.0.13
func (l LocalConfig) Validate() error
type PDPServiceConfig ¶ added in v0.0.13
type PDPServiceConfig struct {
OwnerAddress string `mapstructure:"owner_address" validate:"required" flag:"owner-address" toml:"owner_address"`
ContractAddress string `mapstructure:"contract_address" validate:"required" flag:"contract-address" toml:"contract_address"`
LotusEndpoint string `mapstructure:"lotus_endpoint" validate:"required" flag:"lotus-endpoint" toml:"lotus_endpoint"`
SigningServiceConfig SigningServiceConfig `mapstructure:"signing_service" toml:"signing_service,omitempty"`
}
func (PDPServiceConfig) ToAppConfig ¶ added in v0.0.13
func (c PDPServiceConfig) ToAppConfig() (app.PDPServiceConfig, error)
func (PDPServiceConfig) Validate ¶ added in v0.0.13
func (c PDPServiceConfig) Validate() error
type PublisherServiceConfig ¶ added in v0.0.13
type PublisherServiceConfig struct {
AnnounceURLs []string `` /* 130-byte string literal not displayed */
}
func (*PublisherServiceConfig) ToAppConfig ¶ added in v0.0.13
func (s *PublisherServiceConfig) ToAppConfig(publicURL url.URL) (app.PublisherServiceConfig, error)
func (*PublisherServiceConfig) Validate ¶ added in v0.0.13
func (s *PublisherServiceConfig) Validate() error
type RepoConfig ¶ added in v0.0.13
type RepoConfig struct {
DataDir string `mapstructure:"data_dir" validate:"required" flag:"data-dir" toml:"data_dir"`
TempDir string `mapstructure:"temp_dir" validate:"required" flag:"temp-dir" toml:"temp_dir"`
}
func (RepoConfig) ToAppConfig ¶ added in v0.0.13
func (r RepoConfig) ToAppConfig() (app.StorageConfig, error)
func (RepoConfig) Validate ¶ added in v0.0.13
func (r RepoConfig) Validate() error
type ServerConfig ¶ added in v0.0.13
type ServerConfig struct {
Port uint `mapstructure:"port" validate:"required,min=1,max=65535" flag:"port" toml:"port"`
Host string `mapstructure:"host" validate:"required" flag:"host" toml:"host"`
PublicURL string `mapstructure:"public_url" validate:"omitempty,url" flag:"public-url" toml:"public_url"`
}
func (ServerConfig) ToAppConfig ¶ added in v0.0.13
func (s ServerConfig) ToAppConfig() (app.ServerConfig, error)
func (ServerConfig) Validate ¶ added in v0.0.13
func (s ServerConfig) Validate() error
type ServicesConfig ¶ added in v0.0.13
type ServicesConfig struct {
ServicePrincipalMapping map[string]string `mapstructure:"principal_mapping" flag:"service-principal-mapping" toml:"principal_mapping,omitempty"`
Indexer IndexingServiceConfig `mapstructure:"indexer" validate:"required" toml:"indexer,omitempty"`
EgressTracker EgressTrackerServiceConfig `mapstructure:"etracker" toml:"etracker,omitempty"`
Upload UploadServiceConfig `mapstructure:"upload" validate:"required" toml:"upload,omitempty"`
Publisher PublisherServiceConfig `mapstructure:"publisher" validate:"required" toml:"publisher,omitempty"`
}
func (ServicesConfig) ToAppConfig ¶ added in v0.0.13
func (s ServicesConfig) ToAppConfig(publicURL url.URL) (app.ExternalServicesConfig, error)
func (ServicesConfig) Validate ¶ added in v0.0.13
func (s ServicesConfig) Validate() error
type SigningServiceConfig ¶ added in v0.0.17
type SigningServiceConfig struct {
// Identity of the signing service
DID string `mapstructure:"did" toml:"did,omitempty"`
// URL endpoint for remote signing service (if using HTTP client)
URL string `mapstructure:"url" toml:"url,omitempty"`
// Private key for in-process signing (if using local signer)
// This should be a hex-encoded private key string
// NB: this should only be used for development purposes
PrivateKey string `mapstructure:"private_key" toml:"private_key,omitempty"`
}
SigningServiceConfig configures the signing service for PDP operations
func (SigningServiceConfig) ToAppConfig ¶ added in v0.0.17
func (c SigningServiceConfig) ToAppConfig() (app.SigningServiceConfig, error)
func (SigningServiceConfig) Validate ¶ added in v0.0.17
func (c SigningServiceConfig) Validate() error
type UCANServerConfig ¶ added in v0.0.13
type UCANServerConfig struct {
Identity IdentityConfig `mapstructure:"identity"`
Repo RepoConfig `mapstructure:"repo"`
Server ServerConfig `mapstructure:"server"`
UCANService UCANServiceConfig `mapstructure:"ucan"`
}
func (UCANServerConfig) Validate ¶ added in v0.0.13
func (u UCANServerConfig) Validate() error
type UCANServiceConfig ¶ added in v0.0.13
type UCANServiceConfig struct {
Services ServicesConfig `mapstructure:"services" toml:"services"`
ProofSetID uint64 `mapstructure:"proof_set" flag:"proof-set" toml:"proof_set"`
}
func (UCANServiceConfig) ToAppConfig ¶ added in v0.0.13
func (s UCANServiceConfig) ToAppConfig(publicURL url.URL) (app.UCANServiceConfig, error)
func (UCANServiceConfig) Validate ¶ added in v0.0.13
func (s UCANServiceConfig) Validate() error
type UploadServiceConfig ¶ added in v0.0.13
type UploadServiceConfig struct {
DID string `mapstructure:"did" validate:"required" flag:"upload-service-did" toml:"did,omitempty"`
URL string `mapstructure:"url" validate:"required,url" flag:"upload-service-url" toml:"url,omitempty"`
}
func (*UploadServiceConfig) ToAppConfig ¶ added in v0.0.13
func (s *UploadServiceConfig) ToAppConfig() (app.UploadServiceConfig, error)
func (*UploadServiceConfig) Validate ¶ added in v0.0.13
func (s *UploadServiceConfig) Validate() error
type Validatable ¶
type Validatable interface {
Validate() error
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.