Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Død over CompositeEventListener #621

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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