mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 20:55:10 +00:00
11 lines
343 B
Ruby
11 lines
343 B
Ruby
class Quota
|
|
Policy = Data.define(:slug, :max_file_size, :max_total_storage)
|
|
|
|
ALL_POLICIES = [
|
|
Policy[:unverified, 10.megabytes, 50.megabytes],
|
|
Policy[:verified, 50.megabytes, 50.gigabytes],
|
|
Policy[:functionally_unlimited, 200.megabytes, 300.gigabytes]
|
|
].index_by &:slug
|
|
|
|
def self.policy(slug) = ALL_POLICIES.fetch slug
|
|
end
|