Documentation ¶
Index ¶
- func DetectLegacyINIFormat(content []byte) bool
- func DetectLegacyINIFormatFromFile(path string) bool
- func LoadAdditionalClientConfigs(paths []string, isLegacyFormat bool, strict bool) ([]v1.ProxyConfigurer, []v1.VisitorConfigurer, error)
- func LoadClientConfig(path string, strict bool) (*v1.ClientCommonConfig, []v1.ProxyConfigurer, []v1.VisitorConfigurer, bool, ...)
- func LoadConfigure(b []byte, c any, strict bool) error
- func LoadConfigureFromFile(path string, c any, strict bool) error
- func LoadFileContentWithTemplate(path string, values *Values) ([]byte, error)
- func LoadServerConfig(path string, strict bool) (*v1.ServerConfig, bool, error)
- func NewProxyConfigurerFromMsg(m *msg.NewProxy, serverCfg *v1.ServerConfig) (v1.ProxyConfigurer, error)
- func RegisterClientCommonConfigFlags(cmd *cobra.Command, c *v1.ClientCommonConfig, opts ...RegisterFlagOption)
- func RegisterProxyFlags(cmd *cobra.Command, c v1.ProxyConfigurer, opts ...RegisterFlagOption)
- func RegisterServerConfigFlags(cmd *cobra.Command, c *v1.ServerConfig, opts ...RegisterFlagOption)
- func RegisterVisitorFlags(cmd *cobra.Command, c v1.VisitorConfigurer, opts ...RegisterFlagOption)
- func RenderWithTemplate(in []byte, values *Values) ([]byte, error)
- func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- type BandwidthQuantityFlag
- type BoolFuncFlag
- type NumberPair
- type PortsRangeSliceFlag
- type RegisterFlagOption
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectLegacyINIFormat ¶
func LoadAdditionalClientConfigs ¶
func LoadAdditionalClientConfigs(paths []string, isLegacyFormat bool, strict bool) ([]v1.ProxyConfigurer, []v1.VisitorConfigurer, error)
func LoadClientConfig ¶
func LoadClientConfig(path string, strict bool) ( *v1.ClientCommonConfig, []v1.ProxyConfigurer, []v1.VisitorConfigurer, bool, error, )
func LoadConfigure ¶
LoadConfigure loads configuration from bytes and unmarshal into c. Now it supports json, yaml and toml format.
func LoadServerConfig ¶
func NewProxyConfigurerFromMsg ¶
func NewProxyConfigurerFromMsg(m *msg.NewProxy, serverCfg *v1.ServerConfig) (v1.ProxyConfigurer, error)
func RegisterClientCommonConfigFlags ¶
func RegisterClientCommonConfigFlags(cmd *cobra.Command, c *v1.ClientCommonConfig, opts ...RegisterFlagOption)
func RegisterProxyFlags ¶
func RegisterProxyFlags(cmd *cobra.Command, c v1.ProxyConfigurer, opts ...RegisterFlagOption)
func RegisterServerConfigFlags ¶
func RegisterServerConfigFlags(cmd *cobra.Command, c *v1.ServerConfig, opts ...RegisterFlagOption)
func RegisterVisitorFlags ¶
func RegisterVisitorFlags(cmd *cobra.Command, c v1.VisitorConfigurer, opts ...RegisterFlagOption)
func WordSepNormalizeFunc ¶
func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
WordSepNormalizeFunc changes all flags that contain "_" separators
Types ¶
type BandwidthQuantityFlag ¶
type BandwidthQuantityFlag struct {
V *types.BandwidthQuantity
}
func (*BandwidthQuantityFlag) Set ¶
func (f *BandwidthQuantityFlag) Set(s string) error
func (*BandwidthQuantityFlag) String ¶
func (f *BandwidthQuantityFlag) String() string
func (*BandwidthQuantityFlag) Type ¶
func (f *BandwidthQuantityFlag) Type() string
type BoolFuncFlag ¶
type BoolFuncFlag struct { TrueFunc func() FalseFunc func() // contains filtered or unexported fields }
func (*BoolFuncFlag) Set ¶
func (f *BoolFuncFlag) Set(s string) error
func (*BoolFuncFlag) String ¶
func (f *BoolFuncFlag) String() string
func (*BoolFuncFlag) Type ¶
func (f *BoolFuncFlag) Type() string
type NumberPair ¶
type PortsRangeSliceFlag ¶
type PortsRangeSliceFlag struct {
V *[]types.PortsRange
}
func (*PortsRangeSliceFlag) Set ¶
func (f *PortsRangeSliceFlag) Set(s string) error
func (*PortsRangeSliceFlag) String ¶
func (f *PortsRangeSliceFlag) String() string
func (*PortsRangeSliceFlag) Type ¶
func (f *PortsRangeSliceFlag) Type() string
type RegisterFlagOption ¶
type RegisterFlagOption func(*registerFlagOptions)
func WithSSHMode ¶
func WithSSHMode() RegisterFlagOption
Click to show internal directories.
Click to hide internal directories.