-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
type.go
58 lines (49 loc) · 1.82 KB
/
type.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
package http
import (
"context"
"go.opentelemetry.io/otel/trace"
"golang.org/x/text/message"
"google.golang.org/protobuf/encoding/protojson"
"github.com/shortlink-org/shortlink/boundaries/link/bff-link/infrastructure/http/controllers/cqrs"
"github.com/shortlink-org/shortlink/boundaries/link/bff-link/infrastructure/http/controllers/link"
"github.com/shortlink-org/shortlink/boundaries/link/bff-link/infrastructure/http/controllers/sitemap"
link_cqrs "github.com/shortlink-org/shortlink/boundaries/link/link/infrastructure/rpc/cqrs/link/v1"
link_rpc "github.com/shortlink-org/shortlink/boundaries/link/link/infrastructure/rpc/link/v1"
sitemap_rpc "github.com/shortlink-org/shortlink/boundaries/link/link/infrastructure/rpc/sitemap/v1"
"github.com/shortlink-org/shortlink/internal/di/pkg/autoMaxPro"
"github.com/shortlink-org/shortlink/internal/di/pkg/config"
"github.com/shortlink-org/shortlink/internal/di/pkg/profiling"
"github.com/shortlink-org/shortlink/pkg/logger"
"github.com/shortlink-org/shortlink/pkg/observability/monitoring"
"github.com/shortlink-org/shortlink/pkg/rpc"
)
// API HTTP-server
type Server struct {
ctx context.Context
jsonpb protojson.MarshalOptions
}
// Config HTTP-server config
type Config struct {
// Common
Ctx context.Context
I18n *message.Printer
Log logger.Logger
Config *config.Config
// Observability
Tracer trace.TracerProvider
Monitoring *monitoring.Monitoring
PprofEndpoint profiling.PprofEndpoint
AutoMaxPro autoMaxPro.AutoMaxPro
// Delivery
RpcServer *rpc.Server
// Infrastructure
Link_rpc link_rpc.LinkServiceClient
Link_command link_cqrs.LinkCommandServiceClient
Link_query link_cqrs.LinkQueryServiceClient
Sitemap_rpc sitemap_rpc.SitemapServiceClient
}
type Controller struct {
link.Controller
cqrs.LinkCQRSController
sitemap.SitemapController
}