aws_assume_role_chain.go 785 B

12345678910111213141516171819
  1. package repository
  2. import (
  3. "context"
  4. "github.com/porter-dev/porter/internal/models"
  5. )
  6. // AWSAssumeRoleChainer represents queries on the aws_assume_role_chain table,
  7. // which stores all assume role chain hops
  8. type AWSAssumeRoleChainer interface {
  9. // List returns the final hop in an assume role chain, where the ARN accounts
  10. // are not owned by Porter
  11. List(ctx context.Context, projectID uint) ([]*models.AWSAssumeRoleChain, error)
  12. // ListByAwsAccountId returns the final hops in an assume role chain, where the ARN accounts match the supplied AWS account ID
  13. ListByAwsAccountId(ctx context.Context, targetAwsAccountId string) ([]*models.AWSAssumeRoleChain, error)
  14. // Delete deletes an AWS assume role chain by project ID
  15. Delete(ctx context.Context, projectID uint) error
  16. }