config

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Form     *srun.LoginForm
	Meta     *srun.LoginMeta
	Settings *SettingsConf

	Timeout time.Duration
)

Functions

This section is empty.

Types

type BasicConf

type BasicConf struct {
	Https          bool   `json:"https" yaml:"https"`
	SkipCertVerify bool   `json:"skip_cert_verify" yaml:"skip_cert_verify"`
	Timeout        uint   `json:"timeout" yaml:"timeout"`
	Interfaces     string `json:"interfaces" yaml:"interfaces"`
}

type ConfFromFile

type ConfFromFile struct {
	Form     srun.LoginForm `json:"form" yaml:"form"`
	Meta     srun.LoginMeta `json:"meta" yaml:"meta"`
	Settings SettingsConf   `json:"settings" yaml:"settings"`
}

type DdnsConf

type DdnsConf struct {
	Enable   bool                  `json:"enable" yaml:"enable"`
	TTL      uint                  `json:"ttl" yaml:"ttl"`
	Domain   string                `json:"domain" yaml:"domain"`
	Provider string                `json:"provider" yaml:"provider"`
	Config   DdnsProviderConfigSum `json:"config" yaml:"config"`
}

type DdnsProviderConfigSum added in v1.5.2

type DdnsProviderConfigSum struct {
	dnspod.DnsPod         `yaml:",inline"`
	cloudflare.Cloudflare `yaml:",inline"`
	aliyun.Aliyun         `yaml:",inline"`
}

type GuardianConf

type GuardianConf struct {
	Enable   bool `json:"enable" yaml:"enable"`
	Duration uint `json:"duration" yaml:"duration"`
}

type Json

type Json struct {
}

func (Json) Marshal

func (Json) Marshal(v any) ([]byte, error)

func (Json) Unmarshal

func (Json) Unmarshal(data []byte, v any) error

type LogConf

type LogConf struct {
	DebugLevel bool   `json:"debug_level" yaml:"debug_level"`
	WriteFile  bool   `json:"write_file" yaml:"write_file"`
	FilePath   string `json:"log_path" yaml:"log_path"`
	FileName   string `json:"log_name" yaml:"log_name"`
}

type Reader

type Reader interface {
	Marshal(v any) ([]byte, error)
	Unmarshal(data []byte, v any) error
}

type RealityConf added in v1.5.1

type RealityConf struct {
	Enable bool   `json:"enable" yaml:"enable"`
	Addr   string `json:"addr" yaml:"addr"`
}

type SettingsConf

type SettingsConf struct {
	Basic        BasicConf              `json:"basic" yaml:"basic"`
	Guardian     GuardianConf           `json:"guardian" yaml:"guardian"`
	Log          LogConf                `json:"log" yaml:"log"`
	DDNS         DdnsConf               `json:"ddns" yaml:"ddns"`
	Reality      RealityConf            `json:"reality" yaml:"reality"`
	CustomHeader map[string]interface{} `json:"custom_header" yaml:"custom_header"`
}

type Yaml

type Yaml struct {
}

func (Yaml) Marshal

func (Yaml) Marshal(v any) ([]byte, error)

func (Yaml) Unmarshal

func (Yaml) Unmarshal(data []byte, v any) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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