config

package
v0.0.0-...-a24b8d5 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTP          HTTPConfig
	DB            DB
	Redis         Redis
	AirStackToken string
	JWT           JWT
	Ethereum      EthereumConfig
}

func NewConfig

func NewConfig(path string) (Config, error)

type DB

type DB struct {
	Type         string `default:"postgres"` // PostgreSQL is only supported DB at the moment
	Address      string `default:"127.0.0.1"`
	Port         int    `default:"5432"`
	User         string
	Password     string
	DatabaseName string
}

type EthereumConfig

type EthereumConfig struct {
	GatewayAddress  string
	ContractAddress string
}

type HTTPConfig

type HTTPConfig struct {
	Address string `default:"0.0.0.0"`
	Port    int    `default:"8080"`
}

type JWT

type JWT struct {
	SigningKey string
}

type Redis

type Redis struct {
	Database       uint8  `default:"1"`
	Host           string `default:"redis"`
	Port           uint16 `default:"6379"`
	TimeoutSeconds uint8  `default:"86400"`
}

Jump to

Keyboard shortcuts

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