saver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterSaveDo added in v0.2.8

func AfterSaveDo(results *[]info.Proxy) error

func BeforeSaveDo added in v0.2.8

func BeforeSaveDo(results *[]info.Proxy) error

func ExecuteScripts added in v0.2.8

func ExecuteScripts(scripts []string) error

func SaveConfig

func SaveConfig(results *[]info.Proxy)

func SaveToHTTP

func SaveToHTTP(yamldata []byte, filename string) error

func SaveToLocal

func SaveToLocal(yamlData []byte, filename string) error

func StartHTTPServer

func StartHTTPServer()

func UploadToGist

func UploadToGist(yamlData []byte, filename string) error

func UploadToR2Storage

func UploadToR2Storage(yamlData []byte, filename string) error

func UploadToWebDAV

func UploadToWebDAV(yamlData []byte, filename string) error

func ValiGistConfig

func ValiGistConfig() error

func ValiHTTPConfig

func ValiHTTPConfig() error

func ValiR2Config

func ValiR2Config() error

func ValiWebDAVConfig

func ValiWebDAVConfig() error

Types

type ConfigSaver

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

func NewConfigSaver

func NewConfigSaver(results *[]info.Proxy) *ConfigSaver

func (*ConfigSaver) Save

func (cs *ConfigSaver) Save() error

type GistFile

type GistFile struct {
	Content string `json:"content"`
}

type GistPayload

type GistPayload struct {
	Description string              `json:"description"`
	Public      bool                `json:"public"`
	Files       map[string]GistFile `json:"files"`
}

type GistUploader

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

func NewGistUploader

func NewGistUploader() *GistUploader

func (*GistUploader) Upload

func (g *GistUploader) Upload(yamlData []byte, filename string) error

type KVPayload

type KVPayload struct {
	Filename string `json:"filename"`
	Value    string `json:"value"`
}

type LocalSaver

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

func NewLocalSaver

func NewLocalSaver() (*LocalSaver, error)

func (*LocalSaver) Save

func (ls *LocalSaver) Save(yamlData []byte, filename string) error

type ProxyCategory

type ProxyCategory struct {
	Name    string
	Proxies []map[string]any
	Filter  func(result info.Proxy) bool
}

type R2Uploader

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

func NewR2Uploader

func NewR2Uploader() *R2Uploader

func (*R2Uploader) Upload

func (r *R2Uploader) Upload(yamlData []byte, filename string) error

type WebDAVUploader

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

func NewWebDAVUploader

func NewWebDAVUploader() *WebDAVUploader

func (*WebDAVUploader) Upload

func (w *WebDAVUploader) Upload(yamlData []byte, filename string) error

Jump to

Keyboard shortcuts

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