...
1 package resolver
2
3
4
5
6
7 import (
8 "context"
9
10 "edge-infra.dev/pkg/edge/api/graph/model"
11 )
12
13
14 func (r *mutationResolver) UpdateOperatorInterventionRoleMappings(ctx context.Context, roleMappings []*model.UpdateOperatorInterventionRoleMappingInput) (*model.UpdateOperatorInterventionRoleMappingResponse, error) {
15 return r.OperatorInterventionService.UpdateRoleMappings(ctx, roleMappings)
16 }
17
18
19 func (r *mutationResolver) DeleteOperatorInterventionRoleMapping(ctx context.Context, mapping model.DeleteOperatorInterventionMappingInput) (*model.DeleteOperatorInterventionResponse, error) {
20 return r.OperatorInterventionService.DeleteRoleMapping(ctx, mapping)
21 }
22
23
24 func (r *mutationResolver) CreateOperatorInterventionCommands(ctx context.Context, commands []*model.OperatorInterventionCommandInput) (*model.CreateOperatorInterventionCommandResponse, error) {
25 return r.OperatorInterventionService.CreateCommands(ctx, commands)
26 }
27
28
29 func (r *mutationResolver) DeleteOperatorInterventionCommand(ctx context.Context, command model.OperatorInterventionCommandInput) (*model.DeleteOperatorInterventionCommandResponse, error) {
30 return r.OperatorInterventionService.DeleteCommand(ctx, command)
31 }
32
33
34 func (r *mutationResolver) DeleteOperatorInterventionPrivilege(ctx context.Context, privilege model.OperatorInterventionPrivilegeInput) (*model.DeleteOperatorInterventionPrivilegeResponse, error) {
35 return r.OperatorInterventionService.DeletePrivilege(ctx, privilege)
36 }
37
38
39 func (r *mutationResolver) CreateOperatorInterventionPrivileges(ctx context.Context, privileges []*model.OperatorInterventionPrivilegeInput) (*model.CreateOperatorInterventionPrivilegeResponse, error) {
40 return r.OperatorInterventionService.CreatePrivileges(ctx, privileges)
41 }
42
43
44 func (r *mutationResolver) UpdateOperatorInterventionRules(ctx context.Context, rules []*model.UpdateOperatorInterventionRuleInput) (*model.UpdateOperatorInterventionRuleResponse, error) {
45 return r.OperatorInterventionService.UpdateRules(ctx, rules)
46 }
47
48
49 func (r *mutationResolver) DeleteCommandFromOperatorInterventionRule(ctx context.Context, rule model.DeleteOperatorInterventionRuleInput) (*model.DeleteOperatorInterventionRuleResponse, error) {
50 return r.OperatorInterventionService.DeleteRule(ctx, rule)
51 }
52
53
54 func (r *queryResolver) OperatorInterventionRoleMappings(ctx context.Context, roles []string) ([]*model.OiRoleMapping, error) {
55 return r.OperatorInterventionService.RoleMappings(ctx, roles)
56 }
57
58
59 func (r *queryResolver) OperatorInterventionCommands(ctx context.Context, commands []*model.OperatorInterventionCommandInput) ([]*model.Command, error) {
60 return r.OperatorInterventionService.ReadCommands(ctx, commands)
61 }
62
63
64 func (r *queryResolver) OperatorInterventionPrivileges(ctx context.Context, privileges []*model.OperatorInterventionPrivilegeInput) ([]*model.Privilege, error) {
65 return r.OperatorInterventionService.ReadPrivileges(ctx, privileges)
66 }
67
68
69 func (r *queryResolver) OperatorInterventionRules(ctx context.Context, privileges []*model.OperatorInterventionPrivilegeInput) ([]*model.Rule, error) {
70 return r.OperatorInterventionService.ReadRules(ctx, privileges)
71 }
72
View as plain text