nodeconfig

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("nodeconfig")

Functions

func AddIssuingAccountToNodeConfig

func AddIssuingAccountToNodeConfig(account Account) error

func AddOperatingAccountToNodeConfig

func AddOperatingAccountToNodeConfig(accountID string, account Account) error

func GetAllOperatingAccounts

func GetAllOperatingAccounts() (accounts []model.Account, err error)

func SafeGetConfigFile

func SafeGetConfigFile() (string, error)

Types

type Account

type Account struct {
	NodeAddress     string `json:"NODE_ADDRESS" toml:"NODE_ADDRESS"`
	NodeSeed        string `json:"NODE_SEED" toml:"NODE_SEED"`
	PrivateKeyLabel string `json:"PRIVATE_LABEL"`
	PublicKeyLabel  string `json:"PUBLIC_LABEL"`
}

func GetAccount

func GetAccount(accountName string) (Account, error)

if account name = comn.ISSUING, return issuing account, else return operating account

func GetIBMTokenAccount

func GetIBMTokenAccount() (Account, error)

func GetIssuingAccount

func GetIssuingAccount() (Account, error)

func GetOperatingAccount

func GetOperatingAccount(accountName string) (Account, error)

func IBMTokenAccountExists

func IBMTokenAccountExists() (bool, Account, error)

verify if IBM Token account already exists

func IssuingAccountExists

func IssuingAccountExists() (bool, Account, error)

verify if issuing account already exists

func OperatingAccountExists

func OperatingAccountExists(accountName string) (bool, Account, error)

verify if operating account with given name already exists

func OperatingAddressExists

func OperatingAddressExists(accountAddress string) (bool, Account, error)

verify if operating account with given stellar already exists

type NodeConfig

type NodeConfig struct {
	OperatingAccounts map[string]Account `toml:"DISTRIBUTION_ACCOUNTS"`
	IssuingAccount    Account            `toml:"ISSUING_ACCOUNT"`
	IBMTokenAccount   Account            `toml:"IBM_TOKEN_ACCOUNT"`
}

func LoadNodeConfig

func LoadNodeConfig() (NodeConfig, error)

Load NodeConfig: expose

type OnboardingOperations

type OnboardingOperations struct {
}

type WhiteList

type WhiteList struct {
	ParticipantDomains string `toml:"PARTICIPANT_DOMAINS"`
}

Jump to

Keyboard shortcuts

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