model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ItemTypeProxy = iota
	ItemTypeDelayTest
)

Variables

View Source
var Delays sync.Map

Functions

This section is empty.

Types

type AdapterType

type AdapterType C.AdapterType

func (AdapterType) Is

func (a AdapterType) Is(v C.AdapterType) bool

func (*AdapterType) UnmarshalJSON

func (a *AdapterType) UnmarshalJSON(b []byte) error

type Config

type Config struct {
	AllowLan  *bool   `json:"allow-lan"`
	LogLevel  *string `json:"log-level"`
	Mode      *T.Mode `json:"mode"`
	Port      *int    `json:"port"`
	RedirPort *int    `json:"redir-port"`
	SocksPort *int    `json:"socks-port"`
}

type Delay

type Delay struct {
	Delay HumanDelay
}

type HumanBytes

type HumanBytes string

func (*HumanBytes) UnmarshalJSON

func (h *HumanBytes) UnmarshalJSON(d []byte) error

type HumanDelay

type HumanDelay string

func (*HumanDelay) UnmarshalJSON

func (h *HumanDelay) UnmarshalJSON(d []byte) error

type Log

type Log struct {
	Type    log.LogLevel `json:"type"`
	Payload string       `json:"payload"`
}

type Proxies

type Proxies struct {
	Proxies map[string]Proxy `json:"proxies"`
}

type Proxy

type Proxy struct {
	All  []ProxyName `json:"all"`
	Type AdapterType `json:"type,omitempty"`
	Now  string      `json:"now,omitempty"`
}

type ProxyName

type ProxyName struct {
	Now       bool
	ItemType  int
	Name      string
	ExtraInfo string
}

func (ProxyName) String

func (p ProxyName) String() string

func (*ProxyName) UnmarshalJSON

func (p *ProxyName) UnmarshalJSON(b []byte) error

type Traffic

type Traffic struct {
	Up   HumanBytes `json:"up"`
	Down HumanBytes `json:"down"`
}

Jump to

Keyboard shortcuts

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