Documentation
¶
Index ¶
- Constants
- func AddressHTTP(addr string, cfg interface{}) error
- func AddressRPC(addr string, cfg interface{}) error
- func AddressSwarm(addr string, cfg interface{}) error
- func AddressesBootstrap(addr []string, cfg interface{}) error
- func Filename(ipfs_path string) (string, error)
- func ListenerBase32(addr string, cfg interface{}) error
- func ListenerBase32RPC(addr string, cfg interface{}) error
- func ListenerBase32Swarm(addr string, cfg interface{}) error
- func ListenerBase64(addr string, cfg interface{}) error
- func ListenerBase64RPC(addr string, cfg interface{}) error
- func ListenerBase64Swarm(addr string, cfg interface{}) error
- func Path(configroot, extension string) (string, error)
- func PathRoot() (string, error)
- func Unquote(s string) string
- type Config
- func (c *Config) BootstrapAddresses() []string
- func (c *Config) HTTPHost() (string, error)
- func (c *Config) HTTPPort() (string, error)
- func (c *Config) HostSAM() string
- func (c *Config) MaTargetHTTP() (ma.Multiaddr, error)
- func (c *Config) MaTargetRPC() (ma.Multiaddr, error)
- func (c *Config) MaTargetSwarm() (ma.Multiaddr, error)
- func (c *Config) PortSAM() string
- func (c *Config) Print() []string
- func (c *Config) RPCHost() (string, error)
- func (c *Config) RPCPort() (string, error)
- func (c *Config) SAMAddr() string
- func (c *Config) SAMMultiaddr() (ma.Multiaddr, error)
- func (cfg *Config) Save(ipfs_path string) (*Config, error)
- func (c *Config) SwarmHost() (string, error)
- func (c *Config) SwarmPort() (string, error)
- func (c *Config) TargetHTTP() string
- func (c *Config) TargetRPC() string
- func (c *Config) TargetSwarm() string
Constants ¶
View Source
const ( // DefaultPathName is the default config dir name DefaultPathName = ".ipfs" // DefaultPathRoot is the path to the default config dir location. DefaultPathRoot = "~/" + DefaultPathName // DefaultConfigFile is the filename of the configuration file DefaultConfigFile = "i2pconfig" // EnvDir is the environment variable used to change the path root. EnvDir = "IPFS_PATH" )
Variables ¶
This section is empty.
Functions ¶
func AddressHTTP ¶
func AddressRPC ¶
func AddressSwarm ¶
func AddressesBootstrap ¶
func Filename ¶
Filename returns the correct path to the config file for consumption by other parts of the application
func ListenerBase32 ¶
func ListenerBase32RPC ¶
func ListenerBase32Swarm ¶
func ListenerBase64 ¶
func ListenerBase64RPC ¶
func ListenerBase64Swarm ¶
Types ¶
type Config ¶
type Config struct { SAMHost string SAMPort string TunName string AddressRPC string AddressHTTP string AddressSwarm string EncryptLeaseSet bool EncryptedLeaseSetKey string EncryptedLeaseSetPrivateKey string EncryptedLeaseSetPrivateSigningKey string InAllowZeroHop bool OutAllowZeroHop bool InLength int OutLength int InQuantity int OutQuantity int InVariance int OutVariance int InBackupQuantity int OutBackupQuantity int UseCompression bool FastRecieve bool ReduceIdle bool ReduceIdleTime int ReduceIdleQuantity int CloseIdle bool CloseIdleTime int AccessListType string AccessList []string MessageReliability string OnlyI2P bool ListenerBase32 string ListenerBase64 string ListenerSK string ListenerBase32RPC string ListenerBase64RPC string ListenerSKRPC string ListenerBase32Swarm string ListenerBase64Swarm string ListenerSKSwarm string I2PBootstrapAddresses []string }
Config is a struct very alike the one used to configure IPFS which is used to create, load, and access i2p configurations.
func ConfigAt ¶
ConfigAt loads an i2p gateway plugin from the IPFS_PATH directory. It's a file intended to be as similar to the IPFS config as possible.
func (*Config) BootstrapAddresses ¶
func (*Config) TargetHTTP ¶
TargetHTTP returns the string representation of the IPFS gateway in host:port form(not a multiaddr)
func (*Config) TargetRPC ¶
TargetRPC returns the string representation of the RPC gateway in host:port form(not a multiaddr)
func (*Config) TargetSwarm ¶
Click to show internal directories.
Click to hide internal directories.