package resolver // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. // Code generated by github.com/99designs/gqlgen version v0.17.45 import ( "context" "fmt" "edge-infra.dev/pkg/edge/api/graph/model" ) // CreateLogClassificationLabel is the resolver for the createLogClassificationLabel field. func (r *mutationResolver) CreateLogClassificationLabel(ctx context.Context, logClassificationEdgeID string, labelEdgeID string) (string, error) { created, err := r.LogClassificationLabelsService.CreateLogClassificationLabel(ctx, "", logClassificationEdgeID, labelEdgeID) if err != nil { return "", fmt.Errorf("Error Creating Log Classification Label: %s", err.Error()) } return created, nil } // DeleteLogClassificationLabel is the resolver for the deleteLogClassificationLabel field. func (r *mutationResolver) DeleteLogClassificationLabel(ctx context.Context, logClassificationLabelEdgeID string, logClassificationEdgeID string, labelEdgeID string) (bool, error) { wasDeleted, err := r.LogClassificationLabelsService.DeleteLogClassificationLabel(ctx, logClassificationLabelEdgeID, logClassificationEdgeID, labelEdgeID) if err != nil { return false, fmt.Errorf("Error Deleting Log Classification Label: %s", err.Error()) } return wasDeleted, nil } // UpdateLogClassificationLabel is the resolver for the updateLogClassificationLabel field. func (r *mutationResolver) UpdateLogClassificationLabel(ctx context.Context, logClassificationEdgeID string, labelEdgeID string) (string, error) { updated, err := r.LogClassificationLabelsService.UpdateLogClassificationLabel(ctx, logClassificationEdgeID, labelEdgeID) if err != nil { return "", fmt.Errorf("Error Updating Log Classification Label: %s", err.Error()) } return updated, nil } // GetLogClassificationLabel is the resolver for the getLogClassificationLabel field. func (r *queryResolver) GetLogClassificationLabel(ctx context.Context, logClassificationLabelEdgeID string, logClassificationEdgeID string, labelEdgeID string) (*model.LogClassificationLabel, error) { logClassificationLabel, err := r.LogClassificationLabelsService.GetLogClassificationLabel(ctx, logClassificationLabelEdgeID, logClassificationEdgeID, labelEdgeID) if err != nil { return nil, fmt.Errorf("Error Getting Log Classification Label: %s", err.Error()) } return logClassificationLabel, nil } // GetLogClassificationLabelsByLabel is the resolver for the getLogClassificationLabelsByLabel field. func (r *queryResolver) GetLogClassificationLabelsByLabel(ctx context.Context, labelEdgeID string) ([]*model.LogClassificationLabel, error) { logClassificationLabels, err := r.LogClassificationLabelsService.GetLogClassificationLabelsByLabel(ctx, labelEdgeID) if err != nil { return nil, fmt.Errorf("Error Getting Log Classification Label: %s", err.Error()) } return logClassificationLabels, nil } // GetLogClassificationLabelsByBanner is the resolver for the getLogClassificationLabelsByBanner field. func (r *queryResolver) GetLogClassificationLabelsByBanner(ctx context.Context, bannerEdgeID string) ([]*model.LogClassificationLabel, error) { logClassificationLabels, err := r.LogClassificationLabelsService.GetLogClassificationLabelsByBanner(ctx, bannerEdgeID) if err != nil { return nil, fmt.Errorf("Error Getting Log Classification Label: %s", err.Error()) } return logClassificationLabels, nil }