aws_assume_role_chain.go 676 B

1234567891011121314151617
  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. }