config

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GSConfigFileName            string = ".conf_gscraper.json"
	FileInfoName                string = "files_info.json"
	CloudflareRawDomainFileName string = "cloudflare_raw_domains.txt"
	CloudflareDomainFileName    string = "cloudflare_domains.txt"
	NeoboxResultFileName        string = "conf.txt"
	NeoboxResourceLocalDirName  string = "neobox_related"
	GVCResourceLocalDirName     string = "gvc_resources"
	EnableProxyEnvName          string = "ENV_ENABLE_GSER_PROXY"
	EnableGithubSpeedupEnvName  string = "ENV_ENABLE_GSER_GHPROXY"
	GithubSpeedUpUrl            string = "https://ghproxy.com/"
)

Variables

View Source
var CF_Raw_Domains string = `` /* 7828-byte string literal not displayed */

Functions

func GetMax

func GetMax[T MapValue](list map[int]T) (maxIdx int)

func PrepareSubscribeUrl

func PrepareSubscribeUrl(sUrl string) (r string)

Types

type FileUrl

type FileUrl struct {
	FileName string `json:"file_name"`
	Url      string `json:"url"`
}

type GSConf

type GSConf struct {
	GVCRConifg    *GVCResourceConfig    `json:"gvc_resource_conifg"`
	NeoboxRConfig *NeoboxResourceConfig `json:"neobox_resource_config"`
	LocalProxy    string                `json:"local_proxy"`
}

func NewGSConf

func NewGSConf() (gsc *GSConf)

func (*GSConf) AddGVCAppUrl

func (that *GSConf) AddGVCAppUrl(appUrl string)

func (*GSConf) AddSubscribeUrlForNeobox

func (that *GSConf) AddSubscribeUrlForNeobox(subUrl string)

func (*GSConf) CheckResources

func (that *GSConf) CheckResources()

func (*GSConf) DelGVCAppUrl

func (that *GSConf) DelGVCAppUrl(appNameOrUrl string)

func (*GSConf) DelSubscribeUrlForNeobox

func (that *GSConf) DelSubscribeUrlForNeobox(subUrl string)

func (*GSConf) Initiate

func (that *GSConf) Initiate()

func (*GSConf) Load

func (that *GSConf) Load() (err error)

func (*GSConf) NewGit

func (that *GSConf) NewGit() *ggit.Git

func (*GSConf) Save

func (that *GSConf) Save() (err error)

func (*GSConf) SetDefault

func (that *GSConf) SetDefault()

func (*GSConf) SetNeoboxKey

func (that *GSConf) SetNeoboxKey()

func (*GSConf) ShowAppUrls

func (that *GSConf) ShowAppUrls()

func (*GSConf) ShowNeoboxKey

func (that *GSConf) ShowNeoboxKey()

type GVCResourceConfig

type GVCResourceConfig struct {
	GVCResourceProject string          `json:"gvc_resource_project"`
	GVCResourceDir     string          `json:"gvc_resource_dir"`
	APPUrls            map[int]FileUrl `json:"app_url_list"`
}

type MapValue

type MapValue interface {
	string | FileUrl
}

type NeoboxResourceConfig

type NeoboxResourceConfig struct {
	NeoboxKey             string          `json:"neobox_key"`
	NeoboxResourceProject string          `json:"neobox_resource_project"`
	NeoboxResourceDir     string          `json:"neobox_resource_dir"`
	ProxySubcribeUrlList  map[int]string  `json:"subcribe_url_list"`
	GeoInfoUrls           map[int]FileUrl `json:"geo_info_urls"`
}

Jump to

Keyboard shortcuts

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