2015-09-05 15:48:38 +00:00
|
|
|
package core
|
|
|
|
|
|
|
|
type VUser struct {
|
2015-09-06 20:10:42 +00:00
|
|
|
id VID
|
2015-09-05 15:48:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type VConfig struct {
|
2015-09-06 20:10:42 +00:00
|
|
|
RunAs VUser
|
|
|
|
Port uint16
|
|
|
|
AllowedClients []VUser
|
|
|
|
AllowedProtocol string
|
2015-09-05 15:48:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type VConfigMarshaller interface {
|
2015-09-06 20:10:42 +00:00
|
|
|
Marshal(config VConfig) ([]byte, error)
|
2015-09-05 15:48:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type VConfigUnmarshaller interface {
|
2015-09-06 20:10:42 +00:00
|
|
|
Unmarshal(data []byte) (VConfig, error)
|
2015-09-05 15:48:38 +00:00
|
|
|
}
|