mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
477 B
26 lines
477 B
package log
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"v2ray.com/core/common/serial"
|
|
)
|
|
|
|
type AccessStatus string
|
|
|
|
const (
|
|
AccessAccepted = AccessStatus("accepted")
|
|
AccessRejected = AccessStatus("rejected")
|
|
)
|
|
|
|
type AccessMessage struct {
|
|
From interface{}
|
|
To interface{}
|
|
Status AccessStatus
|
|
Reason interface{}
|
|
}
|
|
|
|
func (m *AccessMessage) String() string {
|
|
return strings.Join([]string{serial.ToString(m.From), string(m.Status), serial.ToString(m.To), serial.ToString(m.Reason)}, " ")
|
|
}
|