Sha256: 8292be320747946dafb29236a39ac541a83e7569b067ba612e60e9d43fd471fa

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

require_relative 'aws_log_cleaner/cloud_watch_logs'
require_relative 'aws_log_cleaner/log_group_cleaner_commands'
require_relative 'aws_log_cleaner/api_gateway'
require_relative 'aws_log_cleaner/api_gateway_retriever'
require_relative 'aws_log_cleaner/log_group_filterer'
require_relative 'aws_log_cleaner/aws_credentials'
require_relative 'aws_log_cleaner/version'


module AwsLogCleaner

  # Application wrapper
  class AwsLogCleaner

    def initialize(credentials_args)
      credentials = AwsCredentials.new(credentials_args)
      cloud_watch_logs = CloudWatchLogs.new(credentials)
      api_gateway = ApiGateway.new(credentials)

      api_retriever = ApiGatewayRetriever.new(api_gateway)
      log_group_filterer = LogGroupFilterer.new(cloud_watch_logs)

      @log_cleaner = LogGroupCleanerCommands.new(
        cloud_watch_logs,
        api_retriever,
        log_group_filterer
      )
    end

    def plan(like)
      @log_cleaner.plan(like)
    end

    def delete(like)
      @log_cleaner.delete(like)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aws_log_cleaner-0.1.7 lib/aws_log_cleaner.rb
aws_log_cleaner-0.1.6 lib/aws_log_cleaner.rb