config

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config contains all the config functions that cannot be used in the cli interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IPFSConfig  IPFSConfig
	RedisConfig RedisConfig
	EthConfig   EthConfig
}

Config is set of all config that relates to .envrc

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the config from .envrc file

type EthConfig

type EthConfig struct {
	RPCURL       string `envconfig:"MB_RPC_URL"`
	PrivateKey   string `envconfig:"MB_PRIVATE_KEY"`
	KeystorePath string `envconfig:"MB_KEYSTORE_PATH"`
	KeyStorePwd  string `envconfig:"MB_KEYSTORE_PWD"`
}

EthConfig is set of all config that relates to ethereum / ethereum like (EVM) networks

type IPFSConfig

type IPFSConfig struct {
	ServiceToken string `envconfig:"IPFS_SERVICE_TOKEN"`
}

IPFSConfig is set of all configs that relates to IPFS pinning

type RedisConfig

type RedisConfig struct {
	Password string `envconfig:"REDIS_PWD" default:""`
}

RedisConfig is set of all config that relates to redis

Jump to

Keyboard shortcuts

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