cherryProfile

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() bool

func Env added in v1.3.0

func Env() string

func GetConfig added in v1.1.0

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

func GetNodeWithConfig added in v1.2.3

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

func Init

func Init(filePath, nodeId string) (cfacade.INode, error)

func LoadNode added in v1.1.5

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

func Name

func Name() string

func Path added in v1.3.0

func Path() string

func PrintLevel added in v1.1.29

func PrintLevel() string

Types

type Config

type Config struct {
	jsoniter.Any
}

func Wrap added in v1.1.29

func Wrap(val interface{}) *Config

func (*Config) GetBool added in v1.1.29

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

func (*Config) GetConfig added in v1.1.29

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

func (*Config) GetDuration added in v1.2.7

func (p *Config) GetDuration(path interface{}, defaultVal ...time.Duration) time.Duration

func (*Config) GetInt added in v1.1.29

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

func (*Config) GetInt32 added in v1.1.29

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

func (*Config) GetInt64 added in v1.1.29

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

func (*Config) GetString added in v1.1.29

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

func (*Config) Unmarshal added in v1.3.6

func (p *Config) Unmarshal(value interface{}) error

type Node added in v1.1.5

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

Node node info

func (*Node) Address added in v1.1.5

func (n *Node) Address() string

func (*Node) Enabled added in v1.1.5

func (n *Node) Enabled() bool

func (*Node) NodeId added in v1.1.5

func (n *Node) NodeId() string

func (*Node) NodeType added in v1.1.5

func (n *Node) NodeType() string

func (*Node) RpcAddress added in v1.1.5

func (n *Node) RpcAddress() string

func (*Node) Settings added in v1.1.5

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

func (*Node) String added in v1.1.5

func (n *Node) String() string

Jump to

Keyboard shortcuts

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