setting

package
v0.0.0-...-77f848b Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSetting

func LoadSetting(configPath string, settings *AppSetting) error

LoadSetting -- Load settings from config file.

Types

type AppSetting

type AppSetting struct {
	DebugInfo              bool              `json:"debug_info"`
	UDPServer              SocketSetting     `json:"udpServer"`
	UDPClient              SocketSetting     `json:"udpClient"`
	DisableCaptureMessage  bool              `json:"disable_capture_message"`
	EventMessageIgnoreKeys []string          `json:"event_message_ignore_keys"`
	EventMessages          []UDPEventSetting `json:"event_messages"`
	UseProxy               bool              `json:"use_proxy"`
	Socks5Proxy            string            `json:"socks5_proxy"`
	Webhook                WebhookSetting    `json:"webhook"`
}

type MessageSetting

type MessageSetting struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	Value   string `json:"value"`
}

type SocketSetting

type SocketSetting struct {
	Host      string `json:"host"`
	Port      int    `json:"port"`
	BlockSize int    `json:"blockSize"`
}

type UDPEventSetting

type UDPEventSetting struct {
	CaptureReg string `json:"captureReg"`
	MessageSetting
}

type WebhookSetting

type WebhookSetting struct {
	Enabled     bool   `json:"enabled"`
	URL         string `json:"url"`
	RequestBody string `json:"request_body"`
}

Jump to

Keyboard shortcuts

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