...

Source file src/edge-infra.dev/pkg/edge/api/graph/resolver/operatorintervention_queries.resolvers.go

Documentation: edge-infra.dev/pkg/edge/api/graph/resolver

     1  package resolver
     2  
     3  // This file will be automatically regenerated based on the schema, any resolver implementations
     4  // will be copied through when generating and any unknown code will be moved to the end.
     5  // Code generated by github.com/99designs/gqlgen version v0.17.45
     6  
     7  import (
     8  	"context"
     9  
    10  	"edge-infra.dev/pkg/edge/api/graph/model"
    11  )
    12  
    13  // UpdateOperatorInterventionRoleMappings is the resolver for the updateOperatorInterventionRoleMappings field.
    14  func (r *mutationResolver) UpdateOperatorInterventionRoleMappings(ctx context.Context, roleMappings []*model.UpdateOperatorInterventionRoleMappingInput) (*model.UpdateOperatorInterventionRoleMappingResponse, error) {
    15  	return r.OperatorInterventionService.UpdateRoleMappings(ctx, roleMappings)
    16  }
    17  
    18  // DeleteOperatorInterventionRoleMapping is the resolver for the deleteOperatorInterventionRoleMapping field.
    19  func (r *mutationResolver) DeleteOperatorInterventionRoleMapping(ctx context.Context, mapping model.DeleteOperatorInterventionMappingInput) (*model.DeleteOperatorInterventionResponse, error) {
    20  	return r.OperatorInterventionService.DeleteRoleMapping(ctx, mapping)
    21  }
    22  
    23  // CreateOperatorInterventionCommands is the resolver for the createOperatorInterventionCommands field.
    24  func (r *mutationResolver) CreateOperatorInterventionCommands(ctx context.Context, commands []*model.OperatorInterventionCommandInput) (*model.CreateOperatorInterventionCommandResponse, error) {
    25  	return r.OperatorInterventionService.CreateCommands(ctx, commands)
    26  }
    27  
    28  // DeleteOperatorInterventionCommand is the resolver for the deleteOperatorInterventionCommand field.
    29  func (r *mutationResolver) DeleteOperatorInterventionCommand(ctx context.Context, command model.OperatorInterventionCommandInput) (*model.DeleteOperatorInterventionCommandResponse, error) {
    30  	return r.OperatorInterventionService.DeleteCommand(ctx, command)
    31  }
    32  
    33  // DeleteOperatorInterventionPrivilege is the resolver for the deleteOperatorInterventionPrivilege field.
    34  func (r *mutationResolver) DeleteOperatorInterventionPrivilege(ctx context.Context, privilege model.OperatorInterventionPrivilegeInput) (*model.DeleteOperatorInterventionPrivilegeResponse, error) {
    35  	return r.OperatorInterventionService.DeletePrivilege(ctx, privilege)
    36  }
    37  
    38  // CreateOperatorInterventionPrivileges is the resolver for the createOperatorInterventionPrivileges field.
    39  func (r *mutationResolver) CreateOperatorInterventionPrivileges(ctx context.Context, privileges []*model.OperatorInterventionPrivilegeInput) (*model.CreateOperatorInterventionPrivilegeResponse, error) {
    40  	return r.OperatorInterventionService.CreatePrivileges(ctx, privileges)
    41  }
    42  
    43  // UpdateOperatorInterventionRules is the resolver for the updateOperatorInterventionRules field.
    44  func (r *mutationResolver) UpdateOperatorInterventionRules(ctx context.Context, rules []*model.UpdateOperatorInterventionRuleInput) (*model.UpdateOperatorInterventionRuleResponse, error) {
    45  	return r.OperatorInterventionService.UpdateRules(ctx, rules)
    46  }
    47  
    48  // DeleteCommandFromOperatorInterventionRule is the resolver for the deleteCommandFromOperatorInterventionRule field.
    49  func (r *mutationResolver) DeleteCommandFromOperatorInterventionRule(ctx context.Context, rule model.DeleteOperatorInterventionRuleInput) (*model.DeleteOperatorInterventionRuleResponse, error) {
    50  	return r.OperatorInterventionService.DeleteRule(ctx, rule)
    51  }
    52  
    53  // OperatorInterventionRoleMappings is the resolver for the operatorInterventionRoleMappings field.
    54  func (r *queryResolver) OperatorInterventionRoleMappings(ctx context.Context, roles []string) ([]*model.OiRoleMapping, error) {
    55  	return r.OperatorInterventionService.RoleMappings(ctx, roles)
    56  }
    57  
    58  // OperatorInterventionCommands is the resolver for the operatorInterventionCommands field.
    59  func (r *queryResolver) OperatorInterventionCommands(ctx context.Context, commands []*model.OperatorInterventionCommandInput) ([]*model.Command, error) {
    60  	return r.OperatorInterventionService.ReadCommands(ctx, commands)
    61  }
    62  
    63  // OperatorInterventionPrivileges is the resolver for the operatorInterventionPrivileges field.
    64  func (r *queryResolver) OperatorInterventionPrivileges(ctx context.Context, privileges []*model.OperatorInterventionPrivilegeInput) ([]*model.Privilege, error) {
    65  	return r.OperatorInterventionService.ReadPrivileges(ctx, privileges)
    66  }
    67  
    68  // OperatorInterventionRules is the resolver for the operatorInterventionRules field.
    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