config

package
v1.4.1-fix1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: AGPL-3.0 Imports: 12 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   map[string]interface{} `json:"config" json:"config" yaml:"config"`
}

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:"file_path" yaml:"log_path"`
	FileName   string `json:"file_name" yaml:"log_name"`
}

type Reader

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

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"`
}

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