config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSetup

func DefaultSetup(cfg *Config, sdkConfig *sdk.Config)

Handy implementation of SdkConfigSetup that simply setups the prefix inside the configuration

Types

type CodecBuilder

type CodecBuilder func() *codec.Codec

CodecBuilder represents a function that is used to return the proper application codec.

type Config

type Config struct {
	RPCNode        string         `toml:"rpc_node"`
	ClientNode     string         `toml:"client_node"`
	CosmosConfig   CosmosConfig   `toml:"cosmos"`
	DatabaseConfig DatabaseConfig `toml:"database"`
}

Config defines all necessary juno configuration parameters.

func ParseString

func ParseString(configData []byte) (*Config, error)

ParseString attempts to read and parse a Juno config from the given string bytes. An error reading or parsing the config results in a panic.

func Read

func Read(configPath string) (*Config, error)

SetupConfig takes the path to a configuration file and returns the properly parsed configuration

type CosmosConfig

type CosmosConfig struct {
	Prefix  string   `toml:"prefix"`
	Modules []string `toml:"modules"`
}

CosmosConfig contains the data to configure the Cosmos SDK

type DatabaseConfig

type DatabaseConfig struct {
	Type   string      `toml:"type"`
	Config interface{} `toml:"config"`
}

DatabaseConfig represents a generic database configuration

type MongoDBConfig

type MongoDBConfig struct {
	Name string `toml:"name"`
	Uri  string `toml:"uri"`
}

MongoDBConfig defines all database connection configuration parameters for a MongoDB database

type PostgreSQLConfig

type PostgreSQLConfig struct {
	Name     string `toml:"name"`
	Host     string `toml:"host"`
	Port     uint64 `toml:"port"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	SSLMode  string `toml:"ssl_mode"`
	Schema   string `toml:"schema"`
}

PostgreSQLConfig defines all database connection configuration parameters for a PostgreSQL database

type SdkConfigSetup

type SdkConfigSetup func(config *Config, sdkConfig *sdk.Config)

SdkConfigSetup represents a method that allows to customize the given sdk.Config. This should be used to set custom Bech32 addresses prefixes and other app-related configurations.

Jump to

Keyboard shortcuts

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