GitlabContext

Gitlab context

Author

sunlulu.tomato

Samples

import com.mato.gitlab.GitlabContext
import okhttp3.logging.HttpLoggingInterceptor
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeAll
fun main() { 
   //sampleStart 
   GitlabContext.config(
    baseUrl = TestingEnv.GITLAB_BASE_URL.get(),
    token = TestingEnv.GITLAB_TOKEN.get()
) {
    loggingInterceptor = HttpLoggingInterceptor(HttpLoggingInterceptor.Logger(::println)).also {
        it.level = HttpLoggingInterceptor.Level.BODY
    }
} 
   //sampleEnd
}

Properties

Link copied to clipboard
lateinit var baseUrl: String
Link copied to clipboard
var loggingInterceptor: HttpLoggingInterceptor
Link copied to clipboard
lateinit var token: String

Functions

Link copied to clipboard
fun config(baseUrl: String, token: String, others: GitlabContext.() -> Unit = { })

Config