Documentation
¶
Index ¶
- Variables
- func InitIpfs(identity native.Identity, mobile bool, server bool) (*native.Config, error)
- func OpennetBootstrapPeers() ([]peer.AddrInfo, error)
- func OpennetCafes() ([]peer.AddrInfo, error)
- func TextileBootstrapPeers() ([]peer.AddrInfo, error)
- func Write(repoPath string, conf *Config) error
- type API
- type Account
- type Addresses
- type Cafe
- type CafeHost
- type Config
- type EnabledBot
- type Gateway
- type HTTPHeaders
- type Logs
- type SwarmPorts
Constants ¶
This section is empty.
Variables ¶
var DefaultBootstrapAddresses = []string{}
DefaultBootstrapAddresses are the addresses of cafe nodes run by the Textile team.
var DefaultOpennetBootstrapAddresses = []string{
"/ip4/202.120.38.131/tcp/4001/ipfs/12D3KooWQ41gpmRvEhuAPoMPwQm6DLCSruQiVV1gpSdQL98UKgaZ",
"/ip4/202.120.38.100/tcp/4001/ipfs/QmZt8jsim548Y5UFN24GL9nX9x3eSS8QFMsbSRNMBAqKBb",
"/ip4/159.138.3.74/tcp/4001/ipfs/QmYovpcqB12c56AjGRaMUcwfoZg1DYinCFmEAzFHYvLb6R",
}
DefaultHuaweiBootstrapAddresses are the addresses of nodes run by the SJTU opennetwork team.
var DefaultServerFilters = []string{
"/ip4/10.0.0.0/ipcidr/8",
"/ip4/100.64.0.0/ipcidr/10",
"/ip4/169.254.0.0/ipcidr/16",
"/ip4/172.16.0.0/ipcidr/12",
"/ip4/192.0.0.0/ipcidr/24",
"/ip4/192.0.0.0/ipcidr/29",
"/ip4/192.0.0.8/ipcidr/32",
"/ip4/192.0.0.170/ipcidr/32",
"/ip4/192.0.0.171/ipcidr/32",
"/ip4/192.0.2.0/ipcidr/24",
"/ip4/192.168.0.0/ipcidr/16",
"/ip4/198.18.0.0/ipcidr/15",
"/ip4/198.51.100.0/ipcidr/24",
"/ip4/203.0.113.0/ipcidr/24",
"/ip4/240.0.0.0/ipcidr/4",
"/ip6/100::/ipcidr/64",
"/ip6/2001:2::/ipcidr/48",
"/ip6/2001:db8::/ipcidr/32",
"/ip6/fc00::/ipcidr/7",
"/ip6/fe80::/ipcidr/10",
}
DefaultServerFilters has is a list of IPv4 and IPv6 prefixes that are private, local only, or unrouteable. according to https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml and https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
var OpennetCafeAddresses = []string{
"/ip6/2001:da8:8000:6084:1a31:bfff:fecf:e603/tcp/12589/ipfs/12D3KooWEBKQAdjyqa4iMp8Lu8NF9tMQSWZoninNNPhbGYJ1xvcH",
"/ip4/202.120.38.131/tcp/12589/ipfs/12D3KooWEBKQAdjyqa4iMp8Lu8NF9tMQSWZoninNNPhbGYJ1xvcH",
}
Functions ¶
func OpennetBootstrapPeers ¶
OpennetBootstrapPeers returns the (parsed) set of Opennet bootstrap peers.
func OpennetCafes ¶
func TextileBootstrapPeers ¶
TextileBootstrapPeers returns the (parsed) set of Textile bootstrap peers.
Types ¶
type API ¶
type API struct { HTTPHeaders HTTPHeaders SizeLimit int64 // Maximum file size limit to accept for POST requests in bytes }
API settings
type Account ¶
type Account struct { Address string // public key (seed is stored in the _possibly_ encrypted datastore) Thread string // thread id of the default account thread used for sync between account peers }
Account store public account info
type Addresses ¶
type Addresses struct { API string // bind address of the local REST API CafeAPI string // bind address of the cafe REST API Gateway string // bind address of the IPFS object gateway Profiling string // bind address of the profiling API }
Addresses stores the (string) bind addresses for the node.
type CafeHost ¶
type CafeHost struct { Open bool // When true, other peers can register with this node for cafe services. URL string // Override the resolved URL of this cafe, useful for load HTTPS and/or load balancers NeighborURL string // Specifies the URL of a secondary cafe. Must return cafe info. SizeLimit int64 // Maximum file size limit to accept for POST requests in bytes. }
CafeHost settings
type Config ¶
type Config struct { Account Account // local node's account (public info only) Addresses Addresses // local node's addresses API API // local node's API settings Gateway Gateway // local node's Gateway settings Logs Logs // local node's log settings IsMobile bool // local node is setup for mobile IsServer bool // local node is setup for a server w/ a public IP IsShadow bool // whether work as shadow node IsAuto bool // whether work as automatic node Cafe Cafe // local node cafe settings Bots []EnabledBot // local node enabled bots }
Config is used to load textile config files.
type EnabledBot ¶
type EnabledBot struct { ID string // the id of the bot CafeAPI bool // if true the bot will be available (public) over the Cafe API }
EnabledBot store settings for an enabled bot
type Logs ¶
type Logs struct {
LogToDisk bool // when true, sends all logs to rolling files on disk
}
Logs settings