giddy/dns_response

Types

Structured tag and value for CAA records.

pub type CaaValue {
  Issue(String)
  Issuewild(String)
  Iodef(String)
}

Constructors

  • Issue(String)
  • Issuewild(String)
  • Iodef(String)

Response to a DNS lookup request made by resolve.

pub type RRResponse {
  A(String, option.Option(Int))
  Aaaa(String, option.Option(Int))
  Caa(critical: Bool, value: CaaValue)
  Cname(String)
  Hinfo(cpu: String, os: String)
  Mx(priority: Int, exchange: String)
  Naptr(
    flags: String,
    service: String,
    regexp: String,
    replacement: String,
    order: Int,
    preference: Int,
  )
  Ns(String)
  Ptr(String)
  Soa(
    nsname: String,
    hostmaster: String,
    serial: Int,
    refresh: Int,
    retry: Int,
    expire: Int,
    minttl: Int,
  )
  Srv(priority: Int, weight: Int, port: Int, name: String)
  Tlsa(
    cert_usage: Int,
    selector: Int,
    match: Int,
    data: BitArray,
  )
  Txt(List(String))
}

Constructors

  • A(String, option.Option(Int))
  • Aaaa(String, option.Option(Int))
  • Caa(critical: Bool, value: CaaValue)
  • Cname(String)
  • Hinfo(cpu: String, os: String)
  • Mx(priority: Int, exchange: String)
  • Naptr(
      flags: String,
      service: String,
      regexp: String,
      replacement: String,
      order: Int,
      preference: Int,
    )
  • Ns(String)
  • Ptr(String)
  • Soa(
      nsname: String,
      hostmaster: String,
      serial: Int,
      refresh: Int,
      retry: Int,
      expire: Int,
      minttl: Int,
    )
  • Srv(priority: Int, weight: Int, port: Int, name: String)
  • Tlsa(cert_usage: Int, selector: Int, match: Int, data: BitArray)
  • Txt(List(String))

Values

pub fn caa_value_from_string(
  field_str: String,
  value: String,
) -> Result(CaaValue, error.GiddyError)

Construct a CaaValue from a string.

pub fn caa_value_to_string(caa: CaaValue) -> String
pub fn response_to_string(response: RRResponse) -> String
✨ Search Document