2026-01-27 13:25:45: merge [main:e5e723811e7a9dc57a6ff5d1c067c07c23a97210];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s

This commit is contained in:
txix committed 2026-01-27 13:25:45 +03:00
1 parent 6a3abf67a2
commit 602a2a1ac4
24 files changed
+222 -114

No files matched your search

+10 -5
View File
@@ -2,6 +2,7 @@ package request
import (
"context"
"isp-gate-service/domain"
"net/http"
"strings"
@@ -24,7 +25,7 @@ type Context struct {
request *http.Request
responseWriter http.ResponseWriter
endpoint string
endpointMeta *domain.EndpointMeta
authenticated bool
authData *AuthData
@@ -36,11 +37,15 @@ type Context struct {
queryParams map[string]string
}
func NewContext(request *http.Request, response http.ResponseWriter, endpoint string) *Context {
func NewContext(
request *http.Request,
response http.ResponseWriter,
endpointMeta *domain.EndpointMeta,
) *Context {
return &Context{
request: request,
responseWriter: response,
endpoint: endpoint,
endpointMeta: endpointMeta,
}
}
@@ -56,8 +61,8 @@ func (c *Context) SetResponseWriter(writer http.ResponseWriter) {
c.responseWriter = writer
}
func (c *Context) Endpoint() string {
return c.endpoint
func (c *Context) EndpointMeta() *domain.EndpointMeta {
return c.endpointMeta
}
func (c *Context) Authenticate(authData AuthData) {