com.river.connector.github.model.BlobContent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connector-github Show documentation
Show all versions of connector-github Show documentation
Extensions & Enterprise Integrations for Kotlin flows.
@file:OptIn(ExperimentalEncodingApi::class)
package com.river.connector.github.model
import kotlin.io.encoding.Base64
import kotlin.io.encoding.ExperimentalEncodingApi
data class BlobContent(
val sha: String,
val nodeId: String,
val size: Long,
val url: String,
val content: String,
val encoding: Encoding
) {
enum class Encoding { `UTF-8`, BASE64 }
val decodedContent: String by lazy {
when (encoding) {
Encoding.`UTF-8` -> content
Encoding.BASE64 -> {
String(Base64.decode(content.replace("\n", "")))
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy