Documentation ¶
Overview ¶
Package config provides configuation definitions and config loading utilities for Temporal (https://github.com/RTradeLtd/Temporal), an easy-to-use interface into distributed and decentralized storage technologies for personal and enterprise use cases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfig ¶
GenerateConfig writes a empty TemporalConfig template to given filepath
Types ¶
type API ¶
type API struct { Connection struct { Certificates struct { CertPath string `json:"cert_path"` KeyPath string `json:"key_path"` } `json:"certificates"` ListenAddress string `json:"listen_address"` // defines parameters for prometheus metric collector Prometheus struct { IP string `json:"ip"` Port string `json:"port"` } `json:"prometheus"` CORS struct { AllowedOrigins []string `json:"allowed_origins"` } `json:"cors"` // define the maximum number of people allowed to connect to the API Limit string `json:"limit"` } `json:"connection"` JWT struct { Key string `json:"key"` Realm string `json:"realm"` } `json:"jwt"` SizeLimitInGigaBytes string `json:"size_limit_in_giga_bytes"` }
API configures the Temporal API
type APIKeys ¶ added in v1.0.3
type APIKeys struct {
ChainRider string `json:"chain_rider"`
}
APIKeys are the various API keys we use
type Database ¶
type Database struct { Name string `json:"name"` URL string `json:"url"` Port string `json:"port"` Username string `json:"username"` Password string `json:"password"` }
Database configures Temporal's connection to a Postgres database
type Ethereum ¶ added in v1.0.1
type Ethereum struct { Account struct { Address string `json:"address"` KeyFile string `json:"key_file"` KeyPass string `json:"key_pass"` } `json:"account"` Connection struct { RPC struct { IP string `json:"ip"` Port string `json:"port"` } `json:"rpc"` IPC struct { Path string `json:"path"` } `json:"ipc"` INFURA struct { URL string `json:"url"` } `json:"infura"` } `json:"connection"` Contracts struct { RTCAddress string `json:"rtc_address"` PaymentContractAddress string `json:"payment_contract_address"` } `json:"contracts"` }
Ethereum configures Temporal's connection, and interaction with the Ethereum blockchain
type IPFS ¶
type IPFS struct { APIConnection struct { Host string `json:"host"` Port string `json:"port"` } `json:"api_connection"` KeystorePath string `json:"keystore_path"` }
IPFS configures Temporal's connection to an IPFS node
type IPFSCluster ¶
type IPFSCluster struct { APIConnection struct { Host string `json:"host"` Port string `json:"port"` } `json:"api_connection"` }
IPFSCluster configures Temporal's connection to an IPFS cluster
type Krab ¶
type Krab struct { URL string `json:"url"` TLS struct { CertPath string `json:"cert_path"` KeyFile string `json:"key_file"` } AuthKey string `json:"auth_key"` LogFile string `json:"log_file"` KeystorePassword string `json:"keystore_password"` }
Krab is used to for key management
type KrabFallback ¶
type KrabFallback Krab
KrabFallback is a fallback configuration for connecting to a secondary krab server
type Lens ¶
type Lens struct { URL string `json:"url"` TLS struct { CertPath string `json:"cert_path"` KeyFile string `json:"key_file"` } `json:"tls"` AuthKey string `json:"auth_key"` Options struct { Engine struct { StorePath string `json:"store_path"` Queue struct { Rate int `json:"rate"` Batch int `json:"batch"` } `json:"queue"` } `json:"engine"` } `json:"options"` }
Lens defines options for the Lens search engine
type Nexus ¶
type Nexus struct { Host string `json:"host"` Port string `json:"port"` Key string `json:"key"` TLS struct { CertPath string `json:"cert"` KeyPath string `json:"key"` } `json:"tls"` Delegator struct { Port string `json:"port"` } `json:"delegator"` }
Nexus defines options for the Nexus, our private network management tool for IPFS.
type Pay ¶
type Pay struct { Address string `json:"address"` Port string `json:"port"` Protocol string `json:"protocol"` TLS struct { CertPath string `json:"cert"` KeyPath string `json:"key"` } `json:"tls"` AuthKey string `json:"auth_key"` }
Pay configures connection to our payment processor
type RabbitMQ ¶
type RabbitMQ struct { URL string `json:"url"` TLSConfig struct { CertFile string `json:"cert_file"` KeyFile string `json:"key_file"` CACertFile string `json:"ca_cert_file"` } `json:"tls_config"` }
RabbitMQ configures Temporal's connection to a RabbitMQ instance
type Sendgrid ¶ added in v1.0.1
type Sendgrid struct { APIKey string `json:"api_key"` EmailAddress string `json:"email_address"` EmailName string `json:"email_name"` }
Sendgrid configures Temporal's connection to Sendgrid
type Services ¶
type Services struct { MoneroRPC string `json:"monero_rpc"` Lens `json:"lens"` Nexus `json:"nexus"` MongoDB struct { URL string `json:"url"` DB string `json:"db"` UploadCollection string `json:"uploads"` } `json:"mongodb"` Raven struct { URL string `json:"url"` User string `json:"user"` Pass string `json:"pass"` } `json:"raven"` Krab `json:"krab"` KrabFallback Krab `json:"krab_fallback"` }
Services are various endpoints we connect to
type Stripe ¶
type Stripe struct { PublishableKey string `json:"publishable_key"` SecretKey string `json:"secret_key"` }
Stripe is used to configure our connection with stripe api
type TemporalConfig ¶
type TemporalConfig struct { API `json:"api,omitempty"` APIKeys `json:"api_keys,omitempty"` AWS `json:"aws,omitempty"` Database `json:"database,omitempty"` Services `json:"services,omitempty"` Ethereum `json:"ethereum,omitempty"` IPFSCluster `json:"ipfs_cluster,omitempty"` IPFS `json:"ipfs,omitempty"` Pay `json:"pay,omitempty"` RabbitMQ `json:"rabbitmq,omitempty"` Sendgrid `json:"sendgrid,omitempty"` Stripe `json:"stripe,omitempty"` Wallets `json:"wallets,omitempty"` LogDir string `json:"log_dir,omitempty"` }
TemporalConfig defines Temporal configuration fields
func LoadConfig ¶
func LoadConfig(configPath string) (*TemporalConfig, error)
LoadConfig loads a TemporalConfig from given filepath