config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterConfigListener

func RegisterConfigListener(watcher WatchNotifyConfigFunc)

Types

type DingTalkConfig

type DingTalkConfig struct {
	Token   string `json:"token"`
	Secret  string `json:"secret"`
	IsAtAll bool   `json:"is_at_all"`
}

DingTalkConfig dingTalk configuration

type FRPNotifyConfig

type FRPNotifyConfig struct {
	BindAddress    string         `json:"-"`
	WindowInterval int64          `json:"-"`
	Blacklist      []string       `json:"blacklist"`
	Whitelist      []string       `json:"whitelist"` // If a handler is configured, only the IP within the handler can be accessed
	NotifyPlugins  []NotifyConfig `json:"notify_plugins"`
}

func DefaultConfigLoad

func DefaultConfigLoad(path string) *FRPNotifyConfig

func Load

func Load(path string) *FRPNotifyConfig

Load config file and parse

type FRPNotifyConfigController

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

func NewConfigController

func NewConfigController(bindAddress string, windowInterval int64, configPath string) *FRPNotifyConfigController

func (*FRPNotifyConfigController) Start

func (c *FRPNotifyConfigController) Start(stop chan struct{})

type GotifyConfig

type GotifyConfig struct {
	ServerProto string `json:"server_proto"`
	ServerAddr  string `json:"server_addr"`
	AppToken    string `json:"app_token"`
}

GotifyConfig gotify configuration

type LarkConfig

type LarkConfig struct {
	WebhookURL string   `json:"webhook_url"`
	Secret     string   `json:"secret"`
	AtUsers    []string `json:"at_users"`
}

type LoadFunc

type LoadFunc func(path string) *FRPNotifyConfig

type NotifyConfig

type NotifyConfig struct {
	Name   string                 `json:"name"`
	Config map[string]interface{} `json:"config,omitempty"`
}

NotifyConfig notify configuration

type WatchNotifyConfigFunc

type WatchNotifyConfigFunc func(cfg FRPNotifyConfig)

type WxWorkConfig

type WxWorkConfig struct {
	CorpID       string   `json:"corp_id"`
	CorpSecret   string   `json:"corp_secret"`
	AgentID      int64    `json:"agent_id"`
	ToUser       []string `json:"to_user"`
	ToParty      []string `json:"to_party"`
	ToTag        []string `json:"to_tag"`
	FilterRegExp string   `json:"filter_regexp"`
	AdminURL     string   `json:"admin_url"`
}

WxWorkConfig wxwork configuration

Jump to

Keyboard shortcuts

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