This commit is contained in:
1 parent
cb123537d5
commit
315bb39f44
5 files changed
+183
-44
No files matched your search
@@ -0,0 +1,30 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.polynom.me/rio/internal/metrics"
|
||||
"git.polynom.me/rio/internal/repo"
|
||||
)
|
||||
|
||||
type GlobalContext struct {
|
||||
DefaultCSP string
|
||||
PagesDomain string
|
||||
Gitea *repo.GiteaClient
|
||||
MetricConfig *metrics.LokiMetricConfig
|
||||
}
|
||||
|
||||
type Context struct {
|
||||
Username string
|
||||
Reponame string
|
||||
Domain string
|
||||
Path string
|
||||
|
||||
// HTTP Stuff
|
||||
Referrer string
|
||||
UserAgent string
|
||||
Writer http.ResponseWriter
|
||||
|
||||
// Pointer to the global context
|
||||
Global *GlobalContext
|
||||
}
|
||||
Reference in new issue
Block a user