Skip to content

Commit

Permalink
Død over CompositeEventListener
Browse files Browse the repository at this point in the history
  • Loading branch information
bjerga committed Jul 19, 2024
1 parent b7ed54d commit 5606e88
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 725 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class InntektProducer(
MdcUtils.withLogFields(
Log.klasse(this),
Log.event(EventName.INNTEKT_REQUESTED),
Log.clientId(transaksjonId),
Log.transaksjonId(transaksjonId),
Log.forespoerselId(request.forespoerselId),
) {
rapid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ enum class Key(
ARBEIDSGIVER_ID("arbeidsgiverId"),
ARBEIDSGIVER_FNR("arbeidsgiver_fnr"),
UUID("uuid"),
CLIENT_ID("client_id"),
FORESPOERSEL_ID("forespoerselId"),
JOURNALPOST_ID("journalpostId"),
DATA("data"),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ import no.nav.helsearbeidsgiver.utils.pipe.mapFirst

fun JsonMessage.toPretty(): String = toJson().parseJson().toPretty()

fun JsonMessage.demandKeys(vararg keys: IKey) {
keys.forEach {
demandKey(it.toString())
}
}

fun JsonMessage.demandValues(vararg keyAndValuePairs: Pair<IKey, String>) {
keyAndValuePairs.forEach { (key, value) ->
demandValue(key.str, value)
Expand All @@ -48,11 +42,6 @@ fun JsonMessage.require(vararg keyAndParserPairs: Pair<IKey, (JsonElement) -> An
validate(JsonMessage::require, keyStringAndParserPairs)
}

fun JsonMessage.interestedIn(vararg keyAndParserPairs: Pair<IKey, (JsonElement) -> Any>) {
val keyStringAndParserPairs = keyAndParserPairs.map { it.mapFirst(IKey::str) }
validate(JsonMessage::interestedIn, keyStringAndParserPairs)
}

fun JsonMessage.interestedIn(vararg keys: IKey) {
val keysAsStr = keys.map(IKey::str).toTypedArray()
interestedIn(*keysAsStr)
Expand Down
Loading

0 comments on commit 5606e88

Please sign in to comment.