utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const JackalGoContextKey = sdk.ContextKey("jackalgo.context")

Variables

This section is empty.

Functions

func GetFileTreeData

func GetFileTreeData(rawPath string, owner string, wallet types.Wallet) (*filetreetypes.QueryFileResponse, error)

func NumTo3xGB

func NumTo3xGB(base int64) int64

func NumTo3xTB

func NumTo3xTB(base int64) int64

Types

type BaseConfig

type BaseConfig struct {

	// The root directory for all data.
	// This should be set in viper so it can unmarshal into this struct
	RootDir string `mapstructure:"home"`

	LogLevel string `mapstructure:"log_level"`

	// Output format: 'plain' (colored text) or 'json'
	LogFormat string `mapstructure:"log_format"`
	// contains filtered or unexported fields
}

func DefaultBaseConfig

func DefaultBaseConfig() BaseConfig

func (BaseConfig) ValidateBasic

func (cfg BaseConfig) ValidateBasic() error

type Config

type Config struct {
	BaseConfig `mapstructure:",squash"`
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default configuration for a Tendermint node

func (*Config) SetRoot

func (cfg *Config) SetRoot(root string) *Config

func (*Config) ValidateBasic

func (cfg *Config) ValidateBasic() error

type Context

type Context struct {
	Viper  *viper.Viper
	Config *Config
	Logger tmlog.Logger
}

func NewContext

func NewContext(v *viper.Viper, config *Config, logger tmlog.Logger) *Context

func NewDefaultContext

func NewDefaultContext() *Context

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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