Golang client

This page describes using the Lenses Golang client.

Installation

go get -u github.com/lensesio/lenses-go

Getting started

import "github.com/lensesio/lenses-go"

// Prepare authentication using raw Username and Password.
auth := lenses.BasicAuthentication{Username: "user", Password: "pass"}


#auth := lenses.KerberosAuthentication{
#    ConfFile: "/etc/krb5.conf",
#    Method:   lenses.KerberosWithPassword{
#        Realm: "my.realm or default if empty",
#        Username: "user",
#        Password: "pass",
#    },
#}

#auth := lenses.KerberosAuthentication{
#    ConfFile: "/etc/krb5.conf",
#    Method:   lenses.KerberosWithKeytab{KeytabFile: "/home/me/krb5_my_keytab.txt"},
#}

#auth := lenses.KerberosAuthentication{
#    ConfFile: "/etc/krb5.conf",
#    Method:   lenses.KerberosFromCCache{CCacheFile: "/tmp/krb5_my_cache_file.conf"},
#}

Configuration

Usage

All lenses-go#Client methods return a typed value based on the call and an error as second output to catch any errors coming from backend or client, forget panics.

Last updated

Was this helpful?