summary refs log tree commit diff stats
path: root/types.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-19 23:45:48 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-20 02:09:20 -0400
commit747f4fb70ff61d3f8a7bb1bed896a913b0999450 (patch)
tree9ed792cbcfba664ebd6d1123f9e7ffdf7fc21105 /types.go
parentf9d8193e1bdce33716b109ac2aea879a8c9b1038 (diff)
downloadgetwtxt-747f4fb70ff61d3f8a7bb1bed896a913b0999450.tar.gz
middleware func to attach remote ip to context
Diffstat (limited to 'types.go')
-rw-r--r--types.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/types.go b/types.go
index 8a707bd..b5f27ce 100644
--- a/types.go
+++ b/types.go
@@ -22,3 +22,8 @@ type Instance struct {
 	Mail  string
 	Desc  string
 }
+
+// ipCtxKey is the Context value key for user IP addresses
+type ipCtxKey int
+
+const ctxKey ipCtxKey = iota