Skip to content

Commit

Permalink
chore: remove unused lines
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmatrhd committed Aug 3, 2023
1 parent 2c9c506 commit b2b46ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
36 changes: 0 additions & 36 deletions domain/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,39 +75,3 @@ func (f *ListActivitiesFilter) GetResources() []*Resource {

return resources
}

// act exists in domain and used across services
// this should be associatable with grants
type act struct {
AccountID string
ProviderType string
ProviderURN string
ResourceType string
ResourceURN string
Permissions []string
Timestamp time.Time
grant *Grant
}

// 1. fetch active grants, within a provider
// - get unique account_ids (A)
// 2. fetch acts
// - cluster by provider/project_id
// - filter by account_ids (A)
// 3. associate acts with grants
// - grant has many activities
// - if no activities, set revocation date

// act.assignGrants([]grant) or grant.assignActs([]act)?
//

// bigqueryAct exists in plugin
type bigqueryAct struct {
AccountID string
ResourceName string // --> resourceURN, resourceType
Permissions []string // gcp permissions
Timestamp time.Time
}

type grants []grants
type acts []act
3 changes: 0 additions & 3 deletions jobs/grant_dormancy_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ func (h *handler) GrantDormancyCheck(ctx context.Context, c Config) error {
}

for _, p := range providers {
if p.URN != "pilotdata-integration-bigquery" {
continue
}
h.logger.Info(fmt.Sprintf("checking dormancy for grants under provider: %q", p.URN))
if err := h.grantService.DormancyCheck(ctx, domain.DormancyCheckCriteria{
ProviderID: p.ID,
Expand Down

0 comments on commit b2b46ea

Please sign in to comment.