porter_app.go 724 B

123456789101112131415161718
  1. package repository
  2. import (
  3. "context"
  4. "github.com/porter-dev/porter/internal/models"
  5. )
  6. // PorterAppRepository represents the set of queries on the PorterApp model
  7. type PorterAppRepository interface {
  8. ReadPorterAppByID(ctx context.Context, id uint) (*models.PorterApp, error)
  9. ReadPorterAppByName(clusterID uint, name string) (*models.PorterApp, error)
  10. ReadPorterAppsByProjectIDAndName(projectID uint, name string) ([]*models.PorterApp, error)
  11. CreatePorterApp(app *models.PorterApp) (*models.PorterApp, error)
  12. ListPorterAppByClusterID(clusterID uint) ([]*models.PorterApp, error)
  13. UpdatePorterApp(app *models.PorterApp) (*models.PorterApp, error)
  14. DeletePorterApp(app *models.PorterApp) (*models.PorterApp, error)
  15. }