config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OnlyPredefined bool
	Predefined     PredefinedPorts
	Ignore         IgnorePorts
}

func GetConfig

func GetConfig() (Config, error)

GetConfig return the config object read from %HOMEPATH%/.wslpp/config.json

type IgnorePorts

type IgnorePorts struct {
	Tcp []int64 `json:"tcp"`
	Udp []int64 `json:"udp"`
}

type JsonFile

type JsonFile struct {
	OnlyPredefined bool            `json:"onlyPredefined"`
	Predefined     PredefinedPorts `json:"predefined"`
	Ignore         IgnorePorts     `json:"ignore"`
}

JsonFile is a struct to unmarshal config file

type PortProxy

type PortProxy struct {
	Local  int64
	Remote int64
}

func (PortProxy) MarshalJSON

func (pp PortProxy) MarshalJSON() ([]byte, error)

func (*PortProxy) UnmarshalJSON

func (pp *PortProxy) UnmarshalJSON(data []byte) error

type PredefinedPorts

type PredefinedPorts struct {
	Tcp []PortProxy `json:"tcp"`
	Udp []PortProxy `json:"udp"`
}

Jump to

Keyboard shortcuts

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