cherryProfile

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() bool

func Dir

func Dir() string

func FileName

func FileName() string

func GetConfig

func GetConfig(path ...interface{}) cfacade.JsonConfig

func GetNodeWithConfig

func GetNodeWithConfig(config *Config, nodeId string) (cfacade.INode, error)

func Init

func Init(profilePath, profileName, nodeId string) (cfacade.INode, error)

func LoadNode

func LoadNode(nodeId string) (cfacade.INode, error)

func Name

func Name() string

func PrintLevel

func PrintLevel() string

Types

type Config

type Config struct {
	jsoniter.Any
}

func Wrap

func Wrap(val interface{}) *Config

func (*Config) GetBool

func (p *Config) GetBool(path interface{}, defaultVal ...bool) bool

func (*Config) GetConfig

func (p *Config) GetConfig(path ...interface{}) cfacade.JsonConfig

func (*Config) GetInt

func (p *Config) GetInt(path interface{}, defaultVal ...int) int

func (*Config) GetInt32

func (p *Config) GetInt32(path interface{}, defaultVal ...int32) int32

func (*Config) GetInt64

func (p *Config) GetInt64(path interface{}, defaultVal ...int64) int64

func (*Config) GetJsonObject

func (p *Config) GetJsonObject(path interface{}, ptrVal interface{}) error

func (*Config) GetString

func (p *Config) GetString(path interface{}, defaultVal ...string) string

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node node info

func (*Node) Address

func (n *Node) Address() string

func (*Node) Enabled

func (n *Node) Enabled() bool

func (*Node) NodeId

func (n *Node) NodeId() string

func (*Node) NodeType

func (n *Node) NodeType() string

func (*Node) RpcAddress

func (n *Node) RpcAddress() string

func (*Node) Settings

func (n *Node) Settings() cfacade.JsonConfig

func (*Node) String

func (n *Node) String() string

Jump to

Keyboard shortcuts

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