class UC3Resources::BucketsClient
Query for repository images by tag
Public Class Methods
Source
# File app/lib/client/resources/buckets.rb, line 10 def self.client UC3::UC3Client.clients.fetch(self.class.to_s, BucketsClient.new) end
Source
# File app/lib/client/resources/buckets.rb, line 14 def initialize @client = Aws::S3::Client.new( region: UC3::UC3Client.region ) @buckets = {} @client.list_buckets.buckets.each do |bucket| @buckets[bucket.name] = { name: bucket.name, created: date_format(bucket.creation_date, convert_timezone: true) } end super(enabled: enabled) rescue StandardError => e super(enabled: false, message: e.to_s) end
              Calls superclass method
              
        UC3::UC3Client::new
            Public Instance Methods
Source
# File app/lib/client/resources/buckets.rb, line 34 def list_buckets table = AdminUI::FilterTable.new( columns: [ AdminUI::Column.new(:name, header: 'Name'), AdminUI::Column.new(:created, header: 'Created') ] ) return table unless enabled @buckets.sort.each do |_key, value| table.add_row(AdminUI::Row.make_row(table.columns, value)) end table end