mirror of
https://github.com/warmbly/warmbly.git
synced 2026-08-19 16:01:16 +00:00
27 lines
841 B
Go
27 lines
841 B
Go
package sequence
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/warmbly/warmbly/internal/errx"
|
|
"github.com/warmbly/warmbly/internal/models"
|
|
"github.com/warmbly/warmbly/internal/repository"
|
|
)
|
|
|
|
type SequenceService interface {
|
|
Create(ctx context.Context, userID, campaignID string) (*models.Sequence, *errx.Error)
|
|
Get(ctx context.Context, userID, campaignID string) ([]models.Sequence, *errx.Error)
|
|
Update(ctx context.Context, userID, campaignID, sequenceID string, data *models.UpdateSequence) (*models.Sequence, *errx.Error)
|
|
Delete(ctx context.Context, userID, campaignID, sequenceID string) *errx.Error
|
|
}
|
|
|
|
type sequenceService struct {
|
|
sequenceRepository repository.SequenceRepository
|
|
}
|
|
|
|
func NewService(sequenceRepository repository.SequenceRepository) SequenceService {
|
|
return &sequenceService{
|
|
sequenceRepository: sequenceRepository,
|
|
}
|
|
}
|