Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AuthKey string `yaml:"auth_key"` ZoneMaps []*ZoneMapSpec `yaml:"zone_maps"` }
Config stores options for the device info manager.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager can provide DeviceInfo entries for incoming HTTP requests.
func New ¶
New returns a new Manager with the given configuration.
func (*Manager) GetDeviceInfoFromRequest ¶
func (m *Manager) GetDeviceInfoFromRequest(w http.ResponseWriter, req *http.Request) *usermetadb.DeviceInfo
GetDeviceInfoFromRequest will retrieve or create a DeviceInfo object for the given request. It will always return a valid object. The ResponseWriter is needed to store the unique ID on the client when a new device info object is created.
Click to show internal directories.
Click to hide internal directories.