1
0

Update module lib/pq to v1.7.0 (#581)

Update module lib/pq to v1.7.0

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/581
This commit is contained in:
renovate
2020-06-08 21:17:38 +00:00
committed by konrad
parent 32a5dff78d
commit bd11c9650e
160 changed files with 48 additions and 19372 deletions

51
vendor/github.com/lib/pq/krb.go generated vendored
View File

@ -1,40 +1,27 @@
package pq
import (
"net"
"strings"
)
// NewGSSFunc creates a GSS authentication provider, for use with
// RegisterGSSProvider.
type NewGSSFunc func() (GSS, error)
/*
* Basic GSSAPI interface to abstract Windows (SSPI) from Unix
* APIs within the driver
*/
var newGss NewGSSFunc
type Gss interface {
// RegisterGSSProvider registers a GSS authentication provider. For example, if
// you need to use Kerberos to authenticate with your server, add this to your
// main package:
//
// import "github.com/lib/pq/auth/kerberos"
//
// func init() {
// pq.RegisterGSSProvider(func() (pq.GSS, error) { return kerberos.NewGSS() })
// }
func RegisterGSSProvider(newGssArg NewGSSFunc) {
newGss = newGssArg
}
// GSS provides GSSAPI authentication (e.g., Kerberos).
type GSS interface {
GetInitToken(host string, service string) ([]byte, error)
GetInitTokenFromSpn(spn string) ([]byte, error)
Continue(inToken []byte) (done bool, outToken []byte, err error)
}
/*
* Find the A record associated with a hostname
* In general, hostnames supplied to the driver should be
* canonicalized because the KDC usually only has one
* principal and not one per potential alias of a host.
*/
func canonicalizeHostname(host string) (string, error) {
canon := host
name, err := net.LookupCNAME(host)
if err != nil {
return "", err
}
name = strings.TrimSuffix(name, ".")
if name != "" {
canon = name
}
return canon, nil
}