diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-19 23:45:48 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-20 02:09:20 -0400 |
commit | 747f4fb70ff61d3f8a7bb1bed896a913b0999450 (patch) | |
tree | 9ed792cbcfba664ebd6d1123f9e7ffdf7fc21105 /types.go | |
parent | f9d8193e1bdce33716b109ac2aea879a8c9b1038 (diff) | |
download | getwtxt-747f4fb70ff61d3f8a7bb1bed896a913b0999450.tar.gz |
middleware func to attach remote ip to context
Diffstat (limited to 'types.go')
-rw-r--r-- | types.go | 5 |
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 |