conf

package
v0.0.0-...-12b7791 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init_config

func Init_config(config_path string) error

Types

type Cache

type Cache struct {
	Folder string `toml:"folder"`
	Size   int    `toml:"size"`
}

type Config

type Config struct {
	Toml_config *TomlConfig
	Abs_path    string
}

///////////////////////////

func Get_config

func Get_config() *Config

func (*Config) Read_config_file

func (config *Config) Read_config_file() (string, error)

func (*Config) Save_config

func (config *Config) Save_config() error

type Log

type Log struct {
	Level string `toml:"level"`
}

type TomlConfig

type TomlConfig struct {
	Log        Log    `toml:"log"`
	Token      string `toml:"token"`
	Https_port int    `toml:"https_port"`
	EndPoint   string `toml:"end_point"`
	Cache      Cache  `toml:"cache"`
}

Jump to

Keyboard shortcuts

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