2017-12-10 16:48:28 -05:00
|
|
|
package log
|
|
|
|
|
2017-12-19 15:28:12 -05:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"v2ray.com/core/common/serial"
|
|
|
|
)
|
|
|
|
|
2017-12-10 16:48:28 -05:00
|
|
|
type AccessStatus string
|
|
|
|
|
|
|
|
const (
|
|
|
|
AccessAccepted = AccessStatus("accepted")
|
|
|
|
AccessRejected = AccessStatus("rejected")
|
|
|
|
)
|
|
|
|
|
|
|
|
type AccessMessage struct {
|
|
|
|
From interface{}
|
|
|
|
To interface{}
|
|
|
|
Status AccessStatus
|
|
|
|
Reason interface{}
|
|
|
|
}
|
2017-12-19 15:28:12 -05:00
|
|
|
|
|
|
|
func (m *AccessMessage) String() string {
|
|
|
|
return strings.Join([]string{serial.ToString(m.From), string(m.Status), serial.ToString(m.To), serial.ToString(m.Reason)}, " ")
|
|
|
|
}
|