config

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const NodeTypeDataOwner = "dataOwner"

The application can be running as a dataOwner node or a storage node.

View Source
const NodeTypeStorage = "storage"

Variables

This section is empty.

Functions

func GetServerType

func GetServerType() string

GetServerType

func InitConfig

func InitConfig(config string) error

InitConfig, load and parses configuration file

Types

type BlockchainConf

type BlockchainConf struct {
	Type   string
	Xchain *XchainConf
	Fabric *FabricConf
}

func GetBlockchainConf

func GetBlockchainConf() *BlockchainConf

GetBlockchainConf

type ChallengerMerkleConf

type ChallengerMerkleConf struct {
	LeveldbRoot string
	ShrinkSize  int64
	SegmentSize int64
}

type ChallengerPairingConf

type ChallengerPairingConf struct {
	MaxIndexNum int64
	Sk          string
	Pk          string
	Randu       string
	Randv       string
}

type DataOwnerChallenger

type DataOwnerChallenger struct {
	Type    string
	Pairing *ChallengerPairingConf
	Merkle  *ChallengerMerkleConf
}

type DataOwnerConf

type DataOwnerConf struct {
	Name          string
	ListenAddress string
	PrivateKey    string
	KeyPath       string
	PublicAddress string
	AllowCros     bool

	Slicer     *DataOwnerSlicerConf
	Encryptor  *DataOwnerEncryptorConf
	Blockchain *BlockchainConf
	Copier     *DataOwnerCopierConf
	Monitor    *MonitorConf
	Challenger *DataOwnerChallenger
}

func GetDataOwnerConf

func GetDataOwnerConf() *DataOwnerConf

GetDataOwnerConf

type DataOwnerCopierConf

type DataOwnerCopierConf struct {
	Type string
}

type DataOwnerEncryptorConf

type DataOwnerEncryptorConf struct {
	Type          string
	SoftEncryptor *SoftEncryptorConf
}

type DataOwnerSlicerConf

type DataOwnerSlicerConf struct {
	Type         string
	SimpleSlicer *SimpleSlicerConf
}

type FabricConf

type FabricConf struct {
	ConfigFile string
	ChannelID  string
	Chaincode  string
	UserName   string
	OrgName    string
}

type IPFSConf

type IPFSConf struct {
	Hosts   []string
	Timeout int64
}

type LocalConf

type LocalConf struct {
	RootPath string
}

type Log

type Log struct {
	Level string
	Path  string
}

func GetLogConf

func GetLogConf() *Log

GetLogConf

type MonitorConf

type MonitorConf struct {
	ChallengingSwitch    string
	NodemaintainerSwitch string
	FileclearInterval    int
	FilemaintainerSwitch string
	FilemigrateInterval  int
}

type ProverConf

type ProverConf struct {
	LocalRoot string
}

type ServerConf

type ServerConf struct {
	Name          string
	ListenAddress string
	PrivateKey    string
	PublicAddress string
	AllowCros     bool
}

func GetServerConf

func GetServerConf() *ServerConf

GetServerConf

type SimpleSlicerConf

type SimpleSlicerConf struct {
	BlockSize int64
	QueueSize int64
}

type SoftEncryptorConf

type SoftEncryptorConf struct {
	Password string
}

type StorageConf

type StorageConf struct {
	Name          string
	ListenAddress string
	PrivateKey    string
	KeyPath       string
	PublicAddress string

	Blockchain *BlockchainConf
	Monitor    *MonitorConf
	Mode       *StorageModeConf
	Prover     *ProverConf
}

func GetStorageConf

func GetStorageConf() *StorageConf

GetStorageConf

type StorageModeConf

type StorageModeConf struct {
	Type  string
	Local *LocalConf
	Ipfs  *IPFSConf
}

type XchainConf

type XchainConf struct {
	Mnemonic        string
	ContractName    string
	ContractAccount string
	ChainAddress    string
	ChainName       string
}

Jump to

Keyboard shortcuts

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