mocks

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2015 License: MIT Imports: 8 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 {
	PortValue           uint16
	LogConfigValue      *LogConfig
	InboundConfigValue  *ConnectionConfig
	OutboundConfigValue *ConnectionConfig
}

func (*Config) InboundConfig

func (config *Config) InboundConfig() config.ConnectionConfig

func (*Config) LogConfig added in v0.9.1

func (config *Config) LogConfig() config.LogConfig

func (*Config) OutboundConfig

func (config *Config) OutboundConfig() config.ConnectionConfig

func (*Config) Port

func (config *Config) Port() uint16

type ConnectionConfig

type ConnectionConfig struct {
	ProtocolValue string
	SettingsValue interface{}
}

func (*ConnectionConfig) Protocol

func (config *ConnectionConfig) Protocol() string

func (*ConnectionConfig) Settings added in v0.9.1

func (config *ConnectionConfig) Settings(config.Type) interface{}

type InboundConnectionHandler

type InboundConnectionHandler struct {
	Data2Send    []byte
	DataReturned *bytes.Buffer
	Port         uint16
	Dispatcher   app.PacketDispatcher
}

func (*InboundConnectionHandler) Communicate

func (handler *InboundConnectionHandler) Communicate(packet v2net.Packet) error

func (*InboundConnectionHandler) Create

func (handler *InboundConnectionHandler) Create(dispatcher app.PacketDispatcher, config interface{}) (proxy.InboundConnectionHandler, error)

func (*InboundConnectionHandler) Listen

func (handler *InboundConnectionHandler) Listen(port uint16) error

type LogConfig added in v0.9.1

type LogConfig struct {
	AccessLogValue string
}

func (*LogConfig) AccessLog added in v0.9.1

func (config *LogConfig) AccessLog() string

type MockUserSet

type MockUserSet struct {
	UserIds    []*config.ID
	UserHashes map[string]int
	Timestamps map[string]int64
}

func (*MockUserSet) AddUser

func (us *MockUserSet) AddUser(user config.User) error

func (*MockUserSet) GetUser

func (us *MockUserSet) GetUser(userhash []byte) (*config.ID, int64, bool)

type OutboundConnectionHandler

type OutboundConnectionHandler struct {
	Data2Send   *bytes.Buffer
	Data2Return []byte
	Destination v2net.Destination
}

func (*OutboundConnectionHandler) Create

func (handler *OutboundConnectionHandler) Create(config interface{}) (proxy.OutboundConnectionHandler, error)

func (*OutboundConnectionHandler) Dispatch added in v0.9.1

func (handler *OutboundConnectionHandler) Dispatch(packet v2net.Packet, ray ray.OutboundRay) error

Jump to

Keyboard shortcuts

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