config

package
v0.0.0-...-2ec1701 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfigFile

func ReadConfigFile(filename string, cfg *Config) error

ReadConfigFile reads the config from `filename` into `cfg`.

func WriteConfigFile

func WriteConfigFile(filename string, cfg *Config) error

WriteConfigFile writes the config from `cfg` into `filename`.

func WriteFile

func WriteFile(filename string, buf []byte) error

WriteFile writes the given buffer `buf` into file named `filename`.

Types

type Config

type Config struct {
	Identity  *Identity
	Datastore *Datastore
}

Config is used to load IPFS config files.

func LoadConfig

func LoadConfig(filename string) (*Config, error)

LoadConfig reads given file and returns the read config, or error.

type Datastore

type Datastore struct {
	Type string
	Path string
}

Datastore tracks the configuration of the datastore.

type Identity

type Identity struct {
	PeerID string
}

Identity tracks the configuration of the local node's identity.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳