Module: Vigiles::Constants

Defined in:
lib/vigiles/constants.rb

Constant Summary collapse

DEFAULT_CONTENT_TYPES =
T.let(
  Set.new(
    %w[
      application/json
    ]
  ).freeze,
  T::Set[String]
)
ALL_IANA_CONTENT_TYPES =
T.let(
  {
    Types::ContentType::ApplicationJson => Set.new(
      %w[
        application/3gppHal+json
        application/3gppHalForms+json
        application/ace+json
        application/activity+json
        application/aif+json
        application/alto-cdni+json
        application/alto-cdnifilter+json
        application/alto-costmap+json
        application/alto-costmapfilter+json
        application/alto-directory+json
        application/alto-endpointprop+json
        application/alto-endpointpropparams+json
        application/alto-endpointcost+json
        application/alto-endpointcostparams+json
        application/alto-error+json
        application/alto-networkmapfilter+json
        application/alto-networkmap+json
        application/alto-propmap+json
        application/alto-propmapparams+json
        application/alto-tips+json
        application/alto-tipsparams+json
        application/alto-updatestreamcontrol+json
        application/alto-updatestreamparams+json
        application/atsc-rdt+json
        application/calendar+json
        application/captive+json
        application/city+json
        application/coap-group+json
        application/csvm+json
        application/cwl+json
        application/dicom+json
        application/dns+json
        application/elm+json
        application/EmergencyCallData.LegacyESN+json
        application/expect-ct-report+json
        application/fhir+json
        application/geo+json
        application/geo+json-seq
        application/geoxacml+json
        application/jf2feed+json
        application/jose+json
        application/jrd+json
        application/jscalendar+json
        application/jscontact+json
        application/json
        application/json-patch+json
        application/json-seq
        application/jsonpath
        application/jwk+json
        application/jwk-set+json
        application/ld+json
        application/linkset+json
        application/manifest+json
        application/merge-patch+json
        application/mud+json
        application/ppsp-tracker+json
        application/problem+json
        application/prs.implied-object+json
        application/prs.implied-object+json-seq
        application/pvd+json
        application/rdap+json
        application/reputon+json
        application/sarif-external-properties+json
        application/sarif+json
        application/scim+json
        application/senml-etch+json
        application/senml+json
        application/sensml+json
        application/spdx+json
        application/stix+json
        application/taxii+json
        application/td+json
        application/tlsrpt+json
        application/tm+json
        application/vcard+json
        application/vnd.acm.addressxfer+json
        application/vnd.acm.chatbot+json
        application/vnd.amadeus+json
        application/vnd.apache.thrift.json
        application/vnd.api+json
        application/vnd.aplextor.warrp+json
        application/vnd.apothekende.reservation+json
        application/vnd.artisan+json
        application/vnd.avalon+json
        application/vnd.bbf.usp.msg+json
        application/vnd.bekitzur-stech+json
        application/vnd.byu.uapi+json
        application/vnd.capasystems-pg+json
        application/vnd.cncf.helm.config.v1+json
        application/vnd.collection.doc+json
        application/vnd.collection+json
        application/vnd.collection.next+json
        application/vnd.coreos.ignition+json
        application/vnd.cryptii.pipe+json
        application/vnd.cyclonedx+json
        application/vnd.datapackage+json
        application/vnd.dataresource+json
        application/vnd.document+json
        application/vnd.drive+json
        application/vnd.eclipse.ditto+json
        application/vnd.eu.kasparian.car+json
        application/vnd.futoin+json
        application/vnd.gentics.grd+json
        application/vnd.geo+json
        application/vnd.gnu.taler.exchange+json
        application/vnd.gnu.taler.merchant+json
        application/vnd.hal+json
        application/vnd.hc+json
        application/vnd.heroku+json
        application/vnd.hyper-item+json
        application/vnd.hyper+json
        application/vnd.hyperdrive+json
        application/vnd.ims.lis.v2.result+json
        application/vnd.ims.lti.v2.toolconsumerprofile+json
        application/vnd.ims.lti.v2.toolproxy.id+json
        application/vnd.ims.lti.v2.toolproxy+json
        application/vnd.ims.lti.v2.toolsettings+json
        application/vnd.ims.lti.v2.toolsettings.simple+json
        application/vnd.ipld.dag-json
        application/vnd.las.las+json
        application/vnd.leap+json
        application/vnd.mason+json
        application/vnd.micro+json
        application/vnd.miele+json
        application/vnd.nacamar.ybrid+json
        application/vnd.nato.bindingdataobject+json
        application/vnd.nearst.inv+json
        application/vnd.oai.workflows+json
        application/vnd.oci.image.manifest.v1+json
        application/vnd.oftn.l10n+json
        application/vnd.oma.lwm2m+json
        application/vnd.oracle.resource+json
        application/vnd.pagerduty+json
        application/vnd.restful+json
        application/vnd.seis+json
        application/vnd.shootproof+json
        application/vnd.shopkick+json
        application/vnd.siren+json
        application/vnd.syft+json
        application/vnd.tableschema+json
        application/vnd.think-cell.ppttc+json
        application/vnd.vel+json
        application/vnd.veritone.aion+json
        application/vnd.xacml+json
        application/voucher-cms+json
        application/webpush-options+json
        application/yang-data+json
        application/yang-patch+json
        application/yang-sid+json
      ].map(&:downcase)
    ).freeze
  }.freeze,
  T::Hash[Types::ContentType, T::Set[String]]
)
DEFAULT_CONTENT_TYPE_RECORDERS =
T.let(
  {
    "application/json" => Vigiles::ConversationRecorders::ApplicationJson.instance
  }.freeze,
  T::Hash[String, Vigiles::ConversationRecorder]
)