json

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2015 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AuthMethodNoAuth   = "noauth"
	AuthMethodUserPass = "password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAddress added in v0.14.1

type IPAddress net.IP

func (*IPAddress) UnmarshalJSON added in v0.14.1

func (this *IPAddress) UnmarshalJSON(data []byte) error

type SocksAccount added in v0.9.1

type SocksAccount struct {
	Username string `json:"user"`
	Password string `json:"pass"`
}

type SocksAccountMap added in v0.14.1

type SocksAccountMap map[string]string

func (*SocksAccountMap) HasAccount added in v0.14.1

func (this *SocksAccountMap) HasAccount(user, pass string) bool

func (*SocksAccountMap) UnmarshalJSON added in v0.14.1

func (this *SocksAccountMap) UnmarshalJSON(data []byte) error

type SocksConfig

type SocksConfig struct {
	AuthMethod string          `json:"auth"`
	Accounts   SocksAccountMap `json:"accounts"`
	UDPEnabled bool            `json:"udp"`
	HostIP     IPAddress       `json:"ip"`
}

func (*SocksConfig) HasAccount added in v0.9.1

func (sc *SocksConfig) HasAccount(user, pass string) bool

func (*SocksConfig) IP added in v0.9.1

func (sc *SocksConfig) IP() net.IP

func (*SocksConfig) IsNoAuth

func (sc *SocksConfig) IsNoAuth() bool

func (*SocksConfig) IsPassword

func (sc *SocksConfig) IsPassword() bool

Jump to

Keyboard shortcuts

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