Skip to content

Commit

Permalink
chore(service): remove the unused code (#894)
Browse files Browse the repository at this point in the history
Because

- The old webhook-related code is deprecated.

This commit

- removes the unused code.
  • Loading branch information
donch1989 authored Nov 30, 2024
1 parent b9c2d05 commit e2ae9d7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pkg/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ type Service interface {
TriggerNamespacePipelineByID(ctx context.Context, ns resource.Namespace, id string, data []*pb.TriggerData, pipelineTriggerID string, returnTraces bool) ([]*structpb.Struct, *pb.TriggerMetadata, error)
TriggerAsyncNamespacePipelineByID(ctx context.Context, ns resource.Namespace, id string, data []*pb.TriggerData, pipelineTriggerID string, returnTraces bool) (*longrunningpb.Operation, error)

CheckPipelineEventCode(ctx context.Context, ns resource.Namespace, id string, code string) (bool, error)
// HandleNamespacePipelineEventByID(ctx context.Context, ns resource.Namespace, id string, eventID string, data *structpb.Struct, pipelineTriggerID string) (*structpb.Struct, error)
DispatchPipelineWebhookEvent(ctx context.Context, params DispatchPipelineWebhookEventParams) (DispatchPipelineWebhookEventResult, error)

TriggerNamespacePipelineReleaseByID(ctx context.Context, ns resource.Namespace, pipelineUID uuid.UUID, id string, data []*pb.TriggerData, pipelineTriggerID string, returnTraces bool) ([]*structpb.Struct, *pb.TriggerMetadata, error)
Expand Down
9 changes: 0 additions & 9 deletions pkg/service/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -1818,15 +1818,6 @@ func (s *service) checkTriggerPermission(ctx context.Context, pipeline *datamode
return nil
}

func (s *service) CheckPipelineEventCode(ctx context.Context, ns resource.Namespace, id string, code string) (bool, error) {
dbPipeline, err := s.repository.GetNamespacePipelineByID(ctx, ns.Permalink(), id, false, true)
if err != nil {
return false, errdomain.ErrNotFound
}

return dbPipeline.ShareCode == code, nil
}

func (s *service) TriggerNamespacePipelineByID(ctx context.Context, ns resource.Namespace, id string, data []*pipelinepb.TriggerData, pipelineTriggerID string, returnTraces bool) ([]*structpb.Struct, *pipelinepb.TriggerMetadata, error) {
ownerPermalink := ns.Permalink()

Expand Down

0 comments on commit e2ae9d7

Please sign in to comment.