Documentation ¶
Index ¶
- Constants
- Variables
- func AddAdminRequiredFlags(c *cobra.Command)
- func AddDebugRequiredFlags(c *cobra.Command)
- func AddRpcRequiredFlags(c *cobra.Command)
- func AdminPersistentPreRunE(vc *viper.Viper, adminClient *node.UnixDomainSockHttpClient) func(cmd *cobra.Command, args []string) error
- func ArgsWithDefaultErrorFunc(arg cobra.PositionalArgs) cobra.PositionalArgs
- func ArgsWithErrorFunc(arg cobra.PositionalArgs, errFunc func(cmd *cobra.Command, err error) error) cobra.PositionalArgs
- func BindPFlags(vc *viper.Viper, pFlags *pflag.FlagSet) error
- func CheckFlagsWithViper(vc *viper.Viper, fs *pflag.FlagSet, flagNames ...string) error
- func CommandPathToMarkdown(buf *bytes.Buffer, cmd *cobra.Command)
- func DebugPersistentPreRunE(vc *viper.Viper, dbgClient *client.JsonRpcClient) func(cmd *cobra.Command, args []string) error
- func DefaultArgErrorFunc(cmd *cobra.Command, err error) error
- func DefaultFlagErrorFunc(cmd *cobra.Command, err error) error
- func FlagToMarkdown(buf *bytes.Buffer, vcs ...*viper.Viper) func(f *pflag.Flag)
- func GenerateMarkdown(cmd *cobra.Command, parentVc *viper.Viper, w io.Writer)
- func GetStringMap(f *pflag.Flag) (map[string]interface{}, error)
- func HttpResponsePrettyPrintln(w io.Writer, resp *http.Response) error
- func IsDirectory(p string) (bool, error)
- func JsonPrettyCopyAndClose(w io.Writer, r io.ReadCloser) error
- func JsonPrettyPrintln(w io.Writer, v interface{}) error
- func JsonPrettySaveFile(filename string, perm os.FileMode, v interface{}) error
- func MarkAnnotationCustom(fs *pflag.FlagSet, names ...string) error
- func MarkAnnotationHidden(fs *pflag.FlagSet, names ...string) error
- func MarkAnnotationRequired(fs *pflag.FlagSet, names ...string) error
- func MergeWithViper(vc *viper.Viper, cfg *ServerConfig) error
- func NewBackupCmd(parent *cobra.Command, client *node.UnixDomainSockHttpClient)
- func NewChainCmd(parentCmd *cobra.Command, parentVc *viper.Viper) (*cobra.Command, *viper.Viper)
- func NewCommand(parentCmd *cobra.Command, parentVc *viper.Viper, use, short string) (*cobra.Command, *viper.Viper)
- func NewCui() (*gocui.Gui, <-chan bool)
- func NewDebugCmd(parentCmd *cobra.Command, parentVc *viper.Viper) (*cobra.Command, *viper.Viper)
- func NewGStorageCmd(c string) *cobra.Command
- func NewGenerateMarkdownCommand(parentCmd *cobra.Command, parentVc *viper.Viper) *cobra.Command
- func NewGenesisCmd(c string) *cobra.Command
- func NewKeystoreCmd(c string) *cobra.Command
- func NewMonitorCmd(parentCmd *cobra.Command, parentVc *viper.Viper) *cobra.Command
- func NewRestoreCmd(parent *cobra.Command, client *node.UnixDomainSockHttpClient)
- func NewRpcCmd(parentCmd *cobra.Command, parentVc *viper.Viper) (*cobra.Command, *viper.Viper)
- func NewSendTxCmd(parentCmd *cobra.Command, parentVc *viper.Viper) *cobra.Command
- func NewServerCmd(parentCmd *cobra.Command, parentVc *viper.Viper, version, build string, ...) (*cobra.Command, *viper.Viper)
- func NewStatsCmd(parentCmd *cobra.Command, parentVc *viper.Viper) (*cobra.Command, *viper.Viper)
- func NewSystemCmd(parentCmd *cobra.Command, parentVc *viper.Viper) (*cobra.Command, *viper.Viper)
- func NewUserCmd(parentCmd *cobra.Command, parentVc *viper.Viper) (*cobra.Command, *viper.Viper)
- func NewViper(envPrefix string) *viper.Viper
- func OnInterrupt(cb func())
- func OrArgs(pArgs ...cobra.PositionalArgs) cobra.PositionalArgs
- func ReadFile(name string) ([]byte, error)
- func ReadParam(param string) ([]byte, error)
- func RpcPersistentPreRunE(vc *viper.Viper, rpcClient *client.ClientV3) func(cmd *cobra.Command, args []string) error
- func StartBlockProfile(filename string, rate int) error
- func StartCPUProfile(filename string) error
- func StartMemoryProfile(filename string) error
- func StatsViewToTable(v *node.StatsView, maxColWidth uint) *uitable.Table
- func TermGui(g *gocui.Gui, termCh <-chan bool)
- func UpdateCuiByStatsViewStream(g *gocui.Gui) node.StreamCallbackFunc
- func ValidateFlags(fs *pflag.FlagSet, flagNames ...string) error
- func ValidateFlagsWithViper(vc *viper.Viper, fs *pflag.FlagSet, flagNames ...string) error
- func ViperDecodeOptJson(c *mapstructure.DecoderConfig)
- func ZipDirectory(p string, excludes ...string) ([]byte, error)
- type ServerConfig
Constants ¶
View Source
const (
DefaultKeyStorePass = "gochain"
)
View Source
const (
FlagAnnotationCustom = "custom"
)
View Source
const (
TableCellDisplayNil = "-"
)
Variables ¶
Functions ¶
func AddAdminRequiredFlags ¶
func AddDebugRequiredFlags ¶
func AddRpcRequiredFlags ¶
func AdminPersistentPreRunE ¶
func ArgsWithDefaultErrorFunc ¶
func ArgsWithDefaultErrorFunc(arg cobra.PositionalArgs) cobra.PositionalArgs
func ArgsWithErrorFunc ¶
func ArgsWithErrorFunc(arg cobra.PositionalArgs, errFunc func(cmd *cobra.Command, err error) error) cobra.PositionalArgs
func CheckFlagsWithViper ¶ added in v1.1.0
func DebugPersistentPreRunE ¶
func FlagToMarkdown ¶
func GenerateMarkdown ¶
func IsDirectory ¶
func JsonPrettyCopyAndClose ¶
func JsonPrettyCopyAndClose(w io.Writer, r io.ReadCloser) error
func JsonPrettyPrintln ¶
func JsonPrettySaveFile ¶
func MergeWithViper ¶
func MergeWithViper(vc *viper.Viper, cfg *ServerConfig) error
func NewBackupCmd ¶
func NewBackupCmd(parent *cobra.Command, client *node.UnixDomainSockHttpClient)
func NewChainCmd ¶
func NewCommand ¶
func NewDebugCmd ¶
func NewGStorageCmd ¶
func NewGenesisCmd ¶
func NewKeystoreCmd ¶
func NewMonitorCmd ¶
func NewRestoreCmd ¶
func NewRestoreCmd(parent *cobra.Command, client *node.UnixDomainSockHttpClient)
func NewSendTxCmd ¶
func NewServerCmd ¶
func NewStatsCmd ¶
func NewSystemCmd ¶
func NewUserCmd ¶
func OnInterrupt ¶
func OnInterrupt(cb func())
func OrArgs ¶
func OrArgs(pArgs ...cobra.PositionalArgs) cobra.PositionalArgs
func RpcPersistentPreRunE ¶
func StartBlockProfile ¶ added in v1.3.10
func StartCPUProfile ¶
func StartMemoryProfile ¶
func UpdateCuiByStatsViewStream ¶
func UpdateCuiByStatsViewStream(g *gocui.Gui) node.StreamCallbackFunc
func ValidateFlagsWithViper ¶
func ViperDecodeOptJson ¶
func ViperDecodeOptJson(c *mapstructure.DecoderConfig)
Types ¶
type ServerConfig ¶
type ServerConfig struct { node.StaticConfig KeyStoreData json.RawMessage `json:"key_store,omitempty"` KeyStorePass string `json:"key_password,omitempty"` KeyPlugin string `json:"key_plugin,omitempty"` KeyPlgOptions map[string]string `json:"key_plugin_options,omitempty"` Wallet module.Wallet `json:"-"` LogLevel string `json:"log_level"` ConsoleLevel string `json:"console_level"` LogForwarder *log.ForwarderConfig `json:"log_forwarder,omitempty"` LogWriter *log.WriterConfig `json:"log_writer,omitempty"` // contains filtered or unexported fields }
func (*ServerConfig) GetAddress ¶
func (cfg *ServerConfig) GetAddress() module.Address
func (*ServerConfig) MakesureWallet ¶
func (cfg *ServerConfig) MakesureWallet(gen bool) error
func (*ServerConfig) SetFilePath ¶
func (cfg *ServerConfig) SetFilePath(path string) string
Click to show internal directories.
Click to hide internal directories.