config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	LogSavePath string `mapstructure:"log_save_path"`
	LogFileName string `mapstructure:"log_file_name"`
	LogFileExt  string `mapstructure:"log_file_ext"`
	Mode        string `mapstructure:"mode"`
}

type CkbNode

type CkbNode struct {
	RpcUrl string `mapstructure:"rpc_url"`
	Mode   string `mapstructure:"mode"`
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) ReadSection

func (s *Config) ReadSection(k string, v any) error

type Data

type Data struct {
	Database Database
}

type Database

type Database struct {
	Driver          string
	Dsn             string
	MaxIdleConns    int           `mapstructure:"max_idle_conns"`
	MaxOpenConns    int           `mapstructure:"max_open_conns"`
	ConnMaxLifeTime time.Duration `mapstructure:"conn_max_lifetime"`
}

Jump to

Keyboard shortcuts

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