1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-07 10:47:48 -05:00
v2fly/testing/mocks/config.go

37 lines
697 B
Go
Raw Normal View History

2015-09-19 09:35:20 -04:00
package mocks
import (
"github.com/v2ray/v2ray-core"
)
type ConnectionConfig struct {
ProtocolValue string
ContentValue []byte
}
func (config *ConnectionConfig) Protocol() string {
return config.ProtocolValue
}
func (config *ConnectionConfig) Content() []byte {
return config.ContentValue
}
type Config struct {
PortValue uint16
InboundConfigValue *ConnectionConfig
OutboundConfigValue *ConnectionConfig
}
func (config *Config) Port() uint16 {
return config.PortValue
}
func (config *Config) InboundConfig() core.ConnectionConfig {
return config.InboundConfigValue
}
func (config *Config) OutboundConfig() core.ConnectionConfig {
return config.OutboundConfigValue
}