taxonomy-model


License

License

Categories

Categories

Axon Application Layer Libs Distributed Applications
GroupId

GroupId

fr.davit
ArtifactId

ArtifactId

taxonomy-model_2.12
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

taxonomy-model
taxonomy-model
Project URL

Project URL

https://github.com/RustedBones/taxonomy
Project Organization

Project Organization

Michel Davit
Source Code Management

Source Code Management

https://github.com/RustedBones/taxonomy

Download taxonomy-model_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/fr.davit/taxonomy-model_2.12/ -->
<dependency>
    <groupId>fr.davit</groupId>
    <artifactId>taxonomy-model_2.12</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/fr.davit/taxonomy-model_2.12/
implementation 'fr.davit:taxonomy-model_2.12:1.0.0'
// https://jarcasting.com/artifacts/fr.davit/taxonomy-model_2.12/
implementation ("fr.davit:taxonomy-model_2.12:1.0.0")
'fr.davit:taxonomy-model_2.12:jar:1.0.0'
<dependency org="fr.davit" name="taxonomy-model_2.12" rev="1.0.0">
  <artifact name="taxonomy-model_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.davit', module='taxonomy-model_2.12', version='1.0.0')
)
libraryDependencies += "fr.davit" % "taxonomy-model_2.12" % "1.0.0"
[fr.davit/taxonomy-model_2.12 "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.13
com.beachape : enumeratum_2.12 jar 1.6.1

Project Modules

There are no modules declared in this project.

taxonomy

Continuous Integration Maven Central Software License Scala Steward badge

Strongly typed DNS for scala based on the cats ecosystem with scodec and fs2

Versions

Version Release date cats version Scala versions
1.0.0 2021-05-09 3.1.0 2.13.5, 2.12.13
0.3.0 2021-01-09 2.2.0 2.13.4, 2.12.12
0.2.0 2020-12-20 2.2.0 2.13.4, 2.12.12
0.1.0 2020-12-17 2.2.0 2.13.4, 2.12.12

Getting taxonomy

// DNS with fs2
libraryDependencies += "fr.davit" %% "taxonomy-fs2" % "<version>"

If you want to only part of the project with another IO implementation for instance, you can import the following sub modules

// for the scala model only
libraryDependencies += "fr.davit" %% "taxonomy-model"  % "<version>"
// for the binary protocol with scodec
libraryDependencies += "fr.davit" %% "taxonomy-scodec" % "<version>"

Dns

Here is a quick example of a DNS lookup to the 9.9.9.9 DNS server for the davit.fr domain name

import java.net.{Inet4Address, InetAddress, InetSocketAddress}

import cats.effect._
import cats.effect.unsafe.implicits._
import fr.davit.taxonomy.model.record._
import fr.davit.taxonomy.model._
import fr.davit.taxonomy.scodec.DnsCodec
import fs2.io.net.Network
import munit.CatsEffectSuite
import scodec.Codec

import scala.concurrent.duration._

implicit val codec: Codec[DnsMessage] = DnsCodec.dnsMessage

val quad9DnsServer = new InetSocketAddress("9.9.9.9", 53)

val question        = DnsQuestion("davit.fr", DnsRecordType.A, unicastResponse = false, DnsRecordClass.Internet)
val query           = DnsMessage.query(id = 1, questions = Seq(question))
val socketResource  = Network[IO].openDatagramSocket()
val response        = socketResource.use(s => Dns.resolve(s, DnsPacket(quad9DnsServer, query))).unsafeRunSync()

Based on taxonomy

  • scout: zeroconf DNS-SD client and server
  • shovel: A JVM dig implementation

Versions

Version
1.0.0
0.3.0
0.2.0
0.1.0