summaryrefslogtreecommitdiff
path: root/gemini/request.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-11 10:36:56 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-11 10:36:56 -0700
commite183f9cd23380a81071c32f64c91e60f46a7d8cb (patch)
treed78b0a4936dee3e3201d97668bfb5de4492b3593 /gemini/request.go
parent197d8e4cb0170356dd20755efcf1d336c4c38583 (diff)
lots more documentation comments
Diffstat (limited to 'gemini/request.go')
-rw-r--r--gemini/request.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/gemini/request.go b/gemini/request.go
index 43ee69b..933281b 100644
--- a/gemini/request.go
+++ b/gemini/request.go
@@ -14,10 +14,26 @@ var InvalidRequestLineEnding = errors.New("invalid request line ending")
// Request represents a request over the gemini protocol.
type Request struct {
+ // URL is the specific URL being fetched by the request.
*url.URL
+ // Server is the server which received the request.
+ //
+ // This is only populated in gemini servers.
+ // It is unused on the client end.
Server *Server
+
+ // RemoteAddr is the address of the other side of the connection.
+ //
+ // This will be the server address for clients, or the connecting
+ // client's address in servers.
+ //
+ // Be aware though that proxies (and reverse proxies) can confuse this.
RemoteAddr net.Addr
+
+ // TLSState contains information about the TLS encryption over the connection.
+ //
+ // This includes peer certificates and version information.
TLSState *tls.ConnectionState
}