Documentation
¶
Index ¶
- Constants
- func AddFriend(id string, friend string)
- func GetCollection(id string) map[ckey]map[string]int
- func GetFriends(id string) []string
- func GetRecord(id string) map[string]int
- func GetUserInfo() echo.HandlerFunc
- func IncrementCollection(id string, key ckey, passedID string)
- func IncrementCollections(id string, passedID string)
- func IncrementRecord(id string)
- func Ping(rdb *redis.Client) echo.HandlerFunc
- func SetUserInfo() echo.HandlerFunc
- func SetUserPos(rad float64, rdb *redis.Client) echo.HandlerFunc
- type Message
- type Position
- type ReqUserInfo
- type ResPos
- type UserInfo
Constants ¶
View Source
const ( Likek ckey = "like" Dislikek ckey = "dislike" Fromk ckey = "from" )
Variables ¶
This section is empty.
Functions ¶
func GetCollection ¶
func GetFriends ¶
func GetUserInfo ¶
func GetUserInfo() echo.HandlerFunc
func IncrementCollection ¶
func IncrementCollections ¶
func IncrementRecord ¶
func IncrementRecord(id string)
func SetUserInfo ¶
func SetUserInfo() echo.HandlerFunc
func SetUserPos ¶
func SetUserPos(rad float64, rdb *redis.Client) echo.HandlerFunc
reqでid,lat,lonが来る resですれ違い人数(cnt),すれ違った人のid,lat,lonを配列で返す "cnt": 2, "users": [
{
"id": "user1",
"lat": 35.123456,
"lon": 135.123456
},
...
] すれ違い人数が0の場合は "cnt": 0, "users": [] を返す すれ違ったユーザーの名前をFriendに追加する 一度すれ違ったユーザーはFriendに追加しないかつ、すれ違い人数にも含まない
Types ¶
type ReqUserInfo ¶
Click to show internal directories.
Click to hide internal directories.