Class: Imgproxy::ServiceConfig
- Inherits:
-
Anyway::Config
- Object
- Anyway::Config
- Imgproxy::ServiceConfig
- Defined in:
- lib/imgproxy/service_config.rb
Overview
Imgproxy custom config for services
Instance Attribute Summary collapse
-
#always_encrypt_source_urls ⇒ String
Always encrypt source URLs.
-
#endpoint ⇒ String
imgproxy endpoint.
-
#key ⇒ String
imgproxy hex-encoded signature key.
-
#raw_key ⇒ String
Decoded signature key.
-
#raw_salt ⇒ String
Decoded signature salt.
-
#raw_source_url_encryption_key ⇒ String
Decoded source URL encryption key.
-
#salt ⇒ String
imgproxy hex-encoded signature salt.
-
#signature_size ⇒ String
imgproxy signature size.
-
#source_url_encryption_key ⇒ String
imgproxy hex-encoded source URL encryption key.
Instance Attribute Details
#always_encrypt_source_urls ⇒ String
Always encrypt source URLs. Defaults to false
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#endpoint ⇒ String
imgproxy endpoint
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#key ⇒ String
imgproxy hex-encoded signature key
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#raw_key ⇒ String
Decoded signature key
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#raw_salt ⇒ String
Decoded signature salt
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#raw_source_url_encryption_key ⇒ String
Decoded source URL encryption key
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#salt ⇒ String
imgproxy hex-encoded signature salt
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#signature_size ⇒ String
imgproxy signature size. Defaults to 32
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |
#source_url_encryption_key ⇒ String
imgproxy hex-encoded source URL encryption key
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/imgproxy/service_config.rb', line 37 class ServiceConfig < Anyway::Config # Inherit global config values config_name :imgproxy attr_config( :endpoint, :key, :salt, :raw_key, :raw_salt, :source_url_encryption_key, :raw_source_url_encryption_key, signature_size: 32, always_encrypt_source_urls: false, ) coerce_types( endpoint: :string, key: :string, salt: :string, raw_key: :string, raw_salt: :string, signature_size: :integer, source_url_encryption_key: :string, raw_source_url_encryption_key: :string, always_encrypt_source_urls: :boolean, ) alias_method :set_key, :key= alias_method :set_raw_key, :raw_key= alias_method :set_salt, :salt= alias_method :set_raw_salt, :raw_salt= alias_method :set_source_url_encryption_key, :source_url_encryption_key= alias_method :set_raw_source_url_encryption_key, :raw_source_url_encryption_key= private :set_key, :set_raw_key, :set_salt, :set_raw_salt, :set_source_url_encryption_key, :set_raw_source_url_encryption_key def key=(value) value = value&.to_s super(value) set_raw_key(value && [value].pack("H*")) end def raw_key=(value) value = value&.to_s super(value) set_key(value&.unpack!("H*")) end def salt=(value) value = value&.to_s super(value) set_raw_salt(value && [value].pack("H*")) end def raw_salt=(value) value = value&.to_s super(value) set_salt(value&.unpack1("H*")) end def source_url_encryption_key=(value) value = value&.to_s super(value) set_raw_source_url_encryption_key(value && [value].pack("H*")) end def raw_source_url_encryption_key=(value) value = value&.to_s super(value) set_source_url_encryption_key(value&.unpack1("H*")) end end |