-
Notifications
You must be signed in to change notification settings - Fork 20
/
handlers.go
65 lines (58 loc) · 2.33 KB
/
handlers.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package providers
import (
"github.com/go-masonry/mortar/handlers"
"github.com/go-masonry/mortar/providers/groups"
"go.uber.org/fx"
)
// InternalDebugHandlersFxOption adds Internal Debug Handlers to the graph
func InternalDebugHandlersFxOption() fx.Option {
return fx.Provide(fx.Annotated{
Group: groups.InternalHTTPHandlers + ",flatten",
Target: handlers.InternalDebugHandlers,
})
}
// InternalDebugHandlers is a constructor that creates Internal Debug HTTP Handlers
//
// *Note* normally this dependency is part of a group. If you want to create it as a standalone
// dependency, remember that there can be only one of this kind in the graph.
//
// Consider using InternalDebugHandlersFxOption if you only want to provide it.
var InternalDebugHandlers = handlers.InternalDebugHandlers
// InternalProfileHandlerFunctionsFxOption adds Internal Profiler Handler to the graph
func InternalProfileHandlerFunctionsFxOption() fx.Option {
return fx.Provide(
fx.Annotated{
Group: groups.InternalHTTPHandlerFunctions + ",flatten",
Target: handlers.InternalProfileHandlerFunctions,
})
}
// InternalProfileHandlerFunctions is a constructor that creates Internal Profile HTTP Handlers
//
// *Note* normally this dependency is part of a group. If you want to create it as a standalone
// dependency, remember that there can be only one of this kind in the graph.
//
// Consider using InternalProfileHandlerFunctionsFxOption if you only want to provide it.
var InternalProfileHandlerFunctions = handlers.InternalProfileHandlerFunctions
// InternalSelfHandlersFxOption adds Internal Self Build and Config information HTTP Handlers to the graph
//
// Adds these endpoint on Internal web service
// - /self/build
// - /self/config
func InternalSelfHandlersFxOption() fx.Option {
return fx.Provide(
fx.Annotated{
Group: groups.InternalHTTPHandlers + ",flatten",
Target: handlers.SelfHandlers,
})
}
// SelfHandlers is a constructor that creates Internal Self HTTP Handlers
//
// *Note* normally this dependency is part of a group. If you want to create it as a standalone
// dependency, remember that there can be only one of this kind in the graph.
//
// Adds these endpoint on Internal web service
// - /self/build
// - /self/config
//
// Consider using InternalSelfHandlersFxOption if you only want to provide it.
var SelfHandlers = handlers.SelfHandlers