v2ray-core/proxy/vmess/protocol/testing/static_userset.go

22 lines
487 B
Go
Raw Normal View History

2015-11-09 23:05:25 +00:00
package mocks
import (
2015-12-12 20:40:16 +00:00
"github.com/v2ray/v2ray-core/common/uuid"
2015-12-07 19:32:38 +00:00
"github.com/v2ray/v2ray-core/proxy/vmess"
2016-01-12 10:52:40 +00:00
"github.com/v2ray/v2ray-core/proxy/vmess/protocol"
2015-11-09 23:05:25 +00:00
)
type StaticUserSet struct {
}
func (us *StaticUserSet) AddUser(user *vmess.User) error {
2015-11-09 23:05:25 +00:00
return nil
}
func (us *StaticUserSet) GetUser(userhash []byte) (*vmess.User, protocol.Timestamp, bool) {
2015-12-12 20:40:16 +00:00
id, _ := uuid.ParseString("703e9102-eb57-499c-8b59-faf4f371bb21")
return &vmess.User{
ID: vmess.NewID(id),
}, 0, true
2015-11-09 23:05:25 +00:00
}