-
Notifications
You must be signed in to change notification settings - Fork 39
/
ansibler_service.go
38 lines (28 loc) · 1.34 KB
/
ansibler_service.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
package grpc
import (
"context"
"github.com/berops/claudie/proto/pb"
"github.com/berops/claudie/services/ansibler/server/domain/usecases"
)
type AnsiblerGrpcService struct {
pb.UnimplementedAnsiblerServiceServer
usecases *usecases.Usecases
}
func (a *AnsiblerGrpcService) RemoveClaudieUtilities(_ context.Context, request *pb.RemoveClaudieUtilitiesRequest) (*pb.RemoveClaudieUtilitiesResponse, error) {
return a.usecases.RemoveUtilities(request)
}
func (a *AnsiblerGrpcService) UpdateAPIEndpoint(_ context.Context, request *pb.UpdateAPIEndpointRequest) (*pb.UpdateAPIEndpointResponse, error) {
return a.usecases.UpdateAPIEndpoint(request)
}
func (a *AnsiblerGrpcService) InstallNodeRequirements(_ context.Context, request *pb.InstallRequest) (*pb.InstallResponse, error) {
return a.usecases.InstallNodeRequirements(request)
}
func (a *AnsiblerGrpcService) InstallVPN(_ context.Context, request *pb.InstallRequest) (*pb.InstallResponse, error) {
return a.usecases.InstallVPN(request)
}
func (a *AnsiblerGrpcService) SetUpLoadbalancers(_ context.Context, request *pb.SetUpLBRequest) (*pb.SetUpLBResponse, error) {
return a.usecases.SetUpLoadbalancers(request)
}
func (a *AnsiblerGrpcService) TeardownLoadBalancers(ctx context.Context, request *pb.TeardownLBRequest) (*pb.TeardownLBResponse, error) {
return a.usecases.TeardownLoadBalancers(ctx, request)
}