conf

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GScraperConfigPath string = func() string {
		homeDir, _ := os.UserHomeDir()
		return filepath.Join(homeDir, "gscraper_conf.json")
	}()
)

Functions

This section is empty.

Types

type Config

type Config struct {
	GithubSpeedupUrl    string            `json,koanf:"github_speedup_url"`
	GvcResourceDir      string            `json,koanf:"gvc_resource_dir"`
	GvcResourceProject  string            `json,koanf:"gvc_resource_project"`
	UrlList             map[string]string `json,koanf:"url_list"`
	UrlOrder            []string          `json,koanf:"url_order"`
	GithubVPNSubscriber []string          `json,koanf:"github_vpn_subscriber"`
	LocalProxy          string            `json,koanf:"local_proxy"`
	NeoboxKey           string            `json,koanf:"neobox_key"`
	NeoboxResultFile    string            `json,koanf:"neobox_result_file"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

func (*Config) Add

func (that *Config) Add(dUrl string)

func (*Config) AddGithubVpnSubscriber added in v0.1.7

func (that *Config) AddGithubVpnSubscriber(sUrl string)

func (*Config) ReadGvcResourceDir

func (that *Config) ReadGvcResourceDir()

func (*Config) Remove

func (that *Config) Remove(filename string)

func (*Config) RemoveGithubVPNSubscriber added in v0.1.7

func (that *Config) RemoveGithubVPNSubscriber(index int)

func (*Config) ResetNeoboxKey added in v0.1.7

func (that *Config) ResetNeoboxKey()

func (*Config) Save

func (that *Config) Save()

func (*Config) SetDefault

func (that *Config) SetDefault()

func (*Config) SetLocalProxy added in v0.1.7

func (that *Config) SetLocalProxy(pxy string)

func (*Config) Show

func (that *Config) Show()

func (*Config) ShowGithubVPNSubscriber added in v0.1.7

func (that *Config) ShowGithubVPNSubscriber()

func (*Config) ShowNeoboxKey added in v0.1.7

func (that *Config) ShowNeoboxKey()

Jump to

Keyboard shortcuts

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