validation

package
v0.61.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 12

Documentation

Index

Constants

View Source
const TotalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB

Variables

View Source
var (
	SupportedTransportProtocols = []string{
		"tcp",
		"kcp",
		"quic",
		"websocket",
		"wss",
	}

	SupportedAuthMethods = []v1.AuthMethod{
		"token",
		"oidc",
	}

	SupportedAuthAdditionalScopes = []v1.AuthScope{
		"HeartBeats",
		"NewWorkConns",
	}

	SupportedLogLevels = []string{
		"trace",
		"debug",
		"info",
		"warn",
		"error",
	}

	SupportedHTTPPluginOps = []string{
		splugin.OpLogin,
		splugin.OpNewProxy,
		splugin.OpCloseProxy,
		splugin.OpPing,
		splugin.OpNewWorkConn,
		splugin.OpNewUserConn,
	}
)

Functions

func AppendError

func AppendError(err error, errs ...error) error

func ValidateAnnotations added in v0.55.0

func ValidateAnnotations(annotations map[string]string) error

ValidateAnnotations validates that a set of annotations are correctly defined.

func ValidateAnnotationsSize added in v0.55.0

func ValidateAnnotationsSize(annotations map[string]string) error

func ValidateClientPluginOptions

func ValidateClientPluginOptions(c v1.ClientPluginOptions) error

func ValidatePort

func ValidatePort(port int, fieldPath string) error

ValidatePort checks that the network port is in range

func ValidateProxyConfigurerForClient

func ValidateProxyConfigurerForClient(c v1.ProxyConfigurer) error

func ValidateProxyConfigurerForServer

func ValidateProxyConfigurerForServer(c v1.ProxyConfigurer, s *v1.ServerConfig) error

func ValidateVisitorConfigurer

func ValidateVisitorConfigurer(c v1.VisitorConfigurer) error

Types

type Warning

type Warning error

func ValidateAllClientConfig

func ValidateAllClientConfig(c *v1.ClientCommonConfig, proxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer) (Warning, error)

func ValidateClientCommonConfig

func ValidateClientCommonConfig(c *v1.ClientCommonConfig) (Warning, error)

func ValidateServerConfig

func ValidateServerConfig(c *v1.ServerConfig) (Warning, error)

Jump to

Keyboard shortcuts

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