config

package
v0.0.0-...-98b6286 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigPath

func GetDefaultConfigPath(tool string) (string, error)

func InitLogging

func InitLogging(cfg *Config) (file *os.File, err error)

func ParseFlags

func ParseFlags(tool string) (string, error)

Call API command-line parameters

func ValidateConfigPath

func ValidateConfigPath(path string) error

Types

type Config

type Config struct {
	WSServer struct {
		Host string `yaml:"host,omitempty"`
		Port int    `yaml:"port,omitempty"`
		Path string `yaml:"http_path,omitempty"`
	} `yaml:"ws_server"`

	Log struct {
		FilePath string `yaml:"file_path",omitempty"`
		Level    string `yaml:"level",omitempty"`
	} `yaml:"log"`

	SIP struct {
		URI string `yaml:"uri",omitempty"`
	} `yaml:"sip"`

	MI struct {
		URL string `yaml:"url,omitempty"`
	} `yaml:"mi"`
}

Call API "config.yml" file structure

func NewConfig

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

read & parse configuration file

Jump to

Keyboard shortcuts

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