{"modulePath":"github.com/bitechdev/ResolveSpec","version":"v1.3.14","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package backends\n\nPackage backends assembles a lookup.Provider: it builds the procedure and direct stores for one database and routes every operation to one of them according to lookup.Config. It lives apart from package lookup because both backends import lookup.\n\n## Functions\n\n```go\nfunc Failed(err error) *lookup.Provider\n```\nFailed returns a Provider whose every operation returns err. Constructors that cannot return an error use it so a bad configuration fails closed on first use.\n\n```go\nfunc New(db *sql.DB, cfg lookup.Config, opts Options) (*lookup.Provider, error)\n```\nNew builds a Provider for db. cfg is merged with the defaults and validated; the dialect is cfg.Dialect or detected from the driver. Every operation's mode is resolved up front so an impossible combination (procedure mode on a non-Postgres dialect) fails here, not on the first request.\n\n## Types\n\n```go\ntype Options struct {\n\t// DBFactory is called to obtain a fresh *sql.DB when the current one has been closed.\n\t// Nil disables reconnecting.\n\tDBFactory func() (*sql.DB, error)\n\t// UpgradePasswordHash rewrites a legacy cleartext password as bcrypt after a successful\n\t// direct-mode login. Off by default.\n\tUpgradePasswordHash bool\n\t// NoGroupTables skips the group membership table when loading direct-mode policy rules.\n\tNoGroupTables bool\n}\n```\nOptions are the settings that are not naming or mode.\n\n","path":"github.com/bitechdev/ResolveSpec/pkg/security/lookup/backends","name":"backends","synopsis":"Package backends assembles a lookup.Provider: it builds the procedure and direct stores for one database and routes every operation to one of them according to lookup.Config.","isRedistributable":true}
