Class: Gitlab::Cleanup::OrphanJobArtifactFinalObjects::Paginators::Google

Inherits:
BasePaginator
  • Object
show all
Defined in:
lib/gitlab/cleanup/orphan_job_artifact_final_objects/paginators/google.rb

Constant Summary

Constants inherited from BasePaginator

BasePaginator::BATCH_SIZE

Instance Method Summary collapse

Methods inherited from BasePaginator

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Cleanup::OrphanJobArtifactFinalObjects::Paginators::BasePaginator

Instance Method Details

#filters(marker) ⇒ Object



8
9
10
11
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/paginators/google.rb', line 8

def filters(marker)
  pattern = [bucket_prefix, '*/*/*/@final/**'].compact.join('/')
  super.merge(match_glob: pattern)
end

#get_next_marker(batch) ⇒ Object



25
26
27
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/paginators/google.rb', line 25

def get_next_marker(batch)
  batch.next_page_token
end

#last_page?(batch) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/paginators/google.rb', line 21

def last_page?(batch)
  batch.next_page_token.nil?
end

#max_results_filter_keyObject



17
18
19
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/paginators/google.rb', line 17

def max_results_filter_key
  :max_results
end

#page_marker_filter_keyObject



13
14
15
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/paginators/google.rb', line 13

def page_marker_filter_key
  :page_token
end