-
Notifications
You must be signed in to change notification settings - Fork 27
/
deps.go
40 lines (31 loc) · 869 Bytes
/
deps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package e2e
import (
"net/http"
"github.com/google/wire"
deps "github.com/authgear/authgear-server/pkg/lib/deps"
"github.com/authgear/authgear-server/pkg/util/httputil"
)
func ProvideEnd2EndHTTPRequest() *http.Request {
r, _ := http.NewRequest("GET", "", nil)
return r
}
func ProvideEnd2EndRemoteIP() httputil.RemoteIP {
return httputil.RemoteIP("127.0.0.1")
}
func ProvideEnd2EndUserAgentString() httputil.UserAgentString {
return httputil.UserAgentString("redis-queue")
}
func ProvideEnd2EndHTTPHost() httputil.HTTPHost {
return httputil.HTTPHost("127.0.0.1")
}
func ProvideEnd2EndHTTPProto() httputil.HTTPProto {
return httputil.HTTPProto("https")
}
var End2EndDependencySet = wire.NewSet(
deps.AppRootDeps,
ProvideEnd2EndHTTPRequest,
ProvideEnd2EndRemoteIP,
ProvideEnd2EndUserAgentString,
ProvideEnd2EndHTTPHost,
ProvideEnd2EndHTTPProto,
)