config

package
v0.0.0-...-1df7544 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveUserConifg

func SaveUserConifg(outconfig *Configuration) bool

SaveUserConifg -- Save the input configuration in the json file discarded -

Types

type Configuration

type Configuration struct {
	// Name   string `json:"name"`
	SCSService             bool   `json:SCSservice`
	ShowToPublic           bool   `json:ShowToPublic`
	VnodeServiceCfg        string `json:VnodeServiceCfg`
	VnodeBeneficialAddress string `json:VnodeBeneficialAddress`
	VnodeIP                string `json:"ip"`
	// ip                     *string //
	ForceSubnetP2P []string `json:"ForceSubnetP2P"`
}

Configuration to support the info in vnodeconfig.json

func GetConfiguration

func GetConfiguration(configFilePath string) (*Configuration, error)

GetConfiguration: read config from .json file 1) No config file, using default value, don't create new file; 2) has config file, error in reading config, stop and display correct info; 3) has config file, no error in reading config, go ahead load and run;

func GetUserConfig

func GetUserConfig(filepath string) (*Configuration, error)

GetUserConfig -- read the user configuration in json file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL