toolkit

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

README

Go toolkit Go Report Card

Set of frequently used functions:

  • ClientIP - detects client IP using X-Forwarded-For and X-Real-IP headers along with client address
  • ClientID - assign to client randomly generated unique ID
  • Package geoip - Geo IP database helper

Install

go get gopkg.in/sima-land/go-toolkit.v1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientID added in v1.2.0

func ClientID(req *http.Request, rw http.ResponseWriter, cookieName string) string

ClientID returns randomly generated client's ID

func ClientIP

func ClientIP(req *http.Request) string

ClientIP returns client's IP. If IP can not be detected function returns 127.0.0.1

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL