generated from fluffy-bunny/fluffycore-grpc-starterkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_fluffycore_di.pb.go
83 lines (69 loc) · 3.69 KB
/
user_fluffycore_di.pb.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Code generated by protoc-gen-go-fluffycore-di. DO NOT EDIT.
// Code generated grpcGateway
package user
import (
context "context"
fluffy_dozm_di "github.com/fluffy-bunny/fluffy-dozm-di"
endpoint "github.com/fluffy-bunny/fluffycore/contracts/endpoint"
dicontext "github.com/fluffy-bunny/fluffycore/middleware/dicontext"
runtime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
grpc "google.golang.org/grpc"
)
// IFluffyCoreRageUserServiceServer defines the grpc server
type IFluffyCoreRageUserServiceServer interface {
RageUserServiceServer
}
type UnimplementedFluffyCoreRageUserServiceServerEndpointRegistration struct {
}
func (UnimplementedFluffyCoreRageUserServiceServerEndpointRegistration) RegisterFluffyCoreHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn) {
}
// RageUserServiceFluffyCoreServer defines the grpc server truct
type RageUserServiceFluffyCoreServer struct {
UnimplementedRageUserServiceServer
UnimplementedFluffyCoreRageUserServiceServerEndpointRegistration
}
// RegisterFluffyCoreGRPCService the server with grpc
func (srv *RageUserServiceFluffyCoreServer) RegisterFluffyCoreGRPCService(s *grpc.Server) {
RegisterRageUserServiceServer(s, srv)
}
// AddRageUserServiceServerWithExternalRegistration adds the fluffycore aware grpc server and external registration service. Mainly used for grpc-gateway
func AddRageUserServiceServerWithExternalRegistration(cb fluffy_dozm_di.ContainerBuilder, ctor any, register func() endpoint.IEndpointRegistration) {
fluffy_dozm_di.AddSingleton[endpoint.IEndpointRegistration](cb, register)
fluffy_dozm_di.AddScoped[IFluffyCoreRageUserServiceServer](cb, ctor)
}
// AddRageUserServiceServer adds the fluffycore aware grpc server
func AddRageUserServiceServer(cb fluffy_dozm_di.ContainerBuilder, ctor any) {
AddRageUserServiceServerWithExternalRegistration(cb, ctor, func() endpoint.IEndpointRegistration {
return &RageUserServiceFluffyCoreServer{}
})
}
// CreateRageUser...
func (s *RageUserServiceFluffyCoreServer) CreateRageUser(ctx context.Context, request *CreateRageUserRequest) (*CreateRageUserResponse, error) {
requestContainer := dicontext.GetRequestContainer(ctx)
downstreamService := fluffy_dozm_di.Get[IFluffyCoreRageUserServiceServer](requestContainer)
return downstreamService.CreateRageUser(ctx, request)
}
// GetRageUser...
func (s *RageUserServiceFluffyCoreServer) GetRageUser(ctx context.Context, request *GetRageUserRequest) (*GetRageUserResponse, error) {
requestContainer := dicontext.GetRequestContainer(ctx)
downstreamService := fluffy_dozm_di.Get[IFluffyCoreRageUserServiceServer](requestContainer)
return downstreamService.GetRageUser(ctx, request)
}
// UpdateRageUser...
func (s *RageUserServiceFluffyCoreServer) UpdateRageUser(ctx context.Context, request *UpdateRageUserRequest) (*UpdateRageUserResponse, error) {
requestContainer := dicontext.GetRequestContainer(ctx)
downstreamService := fluffy_dozm_di.Get[IFluffyCoreRageUserServiceServer](requestContainer)
return downstreamService.UpdateRageUser(ctx, request)
}
// LinkRageUser...
func (s *RageUserServiceFluffyCoreServer) LinkRageUser(ctx context.Context, request *LinkRageUserRequest) (*LinkRageUserResponse, error) {
requestContainer := dicontext.GetRequestContainer(ctx)
downstreamService := fluffy_dozm_di.Get[IFluffyCoreRageUserServiceServer](requestContainer)
return downstreamService.LinkRageUser(ctx, request)
}
// UnlinkRageUser...
func (s *RageUserServiceFluffyCoreServer) UnlinkRageUser(ctx context.Context, request *UnlinkRageUserRequest) (*UnlinkRageUserResponse, error) {
requestContainer := dicontext.GetRequestContainer(ctx)
downstreamService := fluffy_dozm_di.Get[IFluffyCoreRageUserServiceServer](requestContainer)
return downstreamService.UnlinkRageUser(ctx, request)
}