Go configuration struct with validation and role-based defaults for webhookx.
// Source: https://github.com/webhookx-io/webhookx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package config
import (
"encoding/json"
"fmt"
"slices"
"github.com/creasty/defaults"
"github.com/webhookx-io/webhookx/config/modules"
"github.com/webhookx-io/webhookx/config/types"
)
type Role string
const (
RoleStandalone Role = "standalone"
RoleCP Role = "cp"
RoleDPWorker Role = "dp_worker"
RoleDPProxy Role = "dp_proxy"
)
func (r Role) IsDataPlane() bool {
return r == RoleDPWorker || r == RoleDPProxy
}
var _ types.Config = &Config{}
// Config Configuration
type Config struct {
modules.BaseConfig
Log modules.LogConfig `yaml:"log" j
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key