Commit 8100efc2 authored by ale's avatar ale

Add JSON tags to DeviceInfo

parent 1a72969a
Pipeline #2472 passed with stages
in 1 minute and 35 seconds
...@@ -10,13 +10,13 @@ import ( ...@@ -10,13 +10,13 @@ import (
// simple persistent cookie to track the same client device across // simple persistent cookie to track the same client device across
// multiple session. // multiple session.
type DeviceInfo struct { type DeviceInfo struct {
ID string ID string `json:"id"`
RemoteAddr string RemoteAddr string `json:"remote_addr"`
RemoteZone string RemoteZone string `json:"remote_zone"`
UserAgent string UserAgent string `json:"user_agent"`
Browser string Browser string `json:"browser"`
OS string OS string `json:"os"`
Mobile bool Mobile bool `json:"mobile"`
} }
func (d *DeviceInfo) encodeToMap(m map[string]string, prefix string) { func (d *DeviceInfo) encodeToMap(m map[string]string, prefix string) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment