/gopgkrb5

Adds the dependencies necessary for Go PG drivers to access krb5.

Primary LanguageGoMIT LicenseMIT

gopgkrb5

Adds the dependencies necessary for Go PG drivers to access krb5.

It is a separate repository for reducing dependencies and is heavily inherited from the lib/pq library.

Usage with jackc/pgconn and friends

Add the library:

go get github.com/otan/gopgkrb5

and initialise the package and import the package into pgconn:

import (
 "github.com/jackc/pgconn"
 "github.com/otan/gopgkrb5"
)

func init() {
  pgconn.RegisterGSSProvider(func() (pgconn.GSS, error) { return gopgkrb5.NewGSS() })
}

All dependencies of jackc/pgconn, e.g. jackc/pgx will now be able to authenticate with GSSAPI/krb5.