serviceaccount.go 828 B

1234567891011121314151617
  1. package repository
  2. import (
  3. "github.com/porter-dev/porter/internal/models"
  4. )
  5. // ServiceAccountRepository represents the set of queries on the
  6. // ServiceAccount model
  7. type ServiceAccountRepository interface {
  8. CreateServiceAccountCandidate(saCandidate *models.ServiceAccountCandidate) (*models.ServiceAccountCandidate, error)
  9. ReadServiceAccountCandidate(id uint) (*models.ServiceAccountCandidate, error)
  10. ListServiceAccountCandidatesByProjectID(projectID uint) ([]*models.ServiceAccountCandidate, error)
  11. CreateServiceAccount(sa *models.ServiceAccount) (*models.ServiceAccount, error)
  12. ReadServiceAccount(id uint) (*models.ServiceAccount, error)
  13. ListServiceAccountsByProjectID(projectID uint) ([]*models.ServiceAccount, error)
  14. UpdateServiceAccountTokenCache(tokenCache *models.TokenCache) (*models.ServiceAccount, error)
  15. }