Documentation ¶
Overview ¶
Package db provides SQL implementations of dex's storage interfaces.
Index ¶
- Variables
- func DropMigrationsTable(dbMap *gorp.DbMap) error
- func GetPlannedMigrations(dbMap *gorp.DbMap) ([]*migrate.PlannedMigration, error)
- func MigrateMaxMigrations(dbMap *gorp.DbMap, max int) (int, error)
- func MigrateToLatest(dbMap *gorp.DbMap) (int, error)
- func NewClientRepo(dbm *gorp.DbMap) client.ClientRepo
- func NewClientRepoFromClients(dbm *gorp.DbMap, cs []client.LoadableClient) (client.ClientRepo, error)
- func NewConnection(cfg Config) (*gorp.DbMap, error)
- func NewHealthChecker(dbm *gorp.DbMap) *healthChecker
- func NewMemDB() *gorp.DbMap
- func NewPasswordInfoRepo(dbm *gorp.DbMap) user.PasswordInfoRepo
- func NewPasswordInfoRepoFromPasswordInfos(dbm *gorp.DbMap, infos []user.PasswordInfo) (user.PasswordInfoRepo, error)
- func NewRefreshTokenRepo(dbm *gorp.DbMap) refresh.RefreshTokenRepo
- func NewRefreshTokenRepoWithGenerator(dbm *gorp.DbMap, gen refresh.RefreshTokenGenerator) refresh.RefreshTokenRepo
- func NewUserRepo(dbm *gorp.DbMap) user.UserRepo
- func NewUserRepoFromUsers(dbm *gorp.DbMap, us []user.UserWithRemoteIdentities) (user.UserRepo, error)
- func TransactionFactory(conn *gorp.DbMap) repo.TransactionFactory
- type Config
- type ConnectorConfigRepo
- type GarbageCollector
- type PrivateKeySetRepo
- type SessionKeyRepo
- type SessionRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorCannotDecryptKeys = errors.New("Cannot Decrypt Keys")
)
Functions ¶
func DropMigrationsTable ¶
func GetPlannedMigrations ¶
func GetPlannedMigrations(dbMap *gorp.DbMap) ([]*migrate.PlannedMigration, error)
func NewClientRepo ¶ added in v0.4.0
func NewClientRepo(dbm *gorp.DbMap) client.ClientRepo
func NewClientRepoFromClients ¶ added in v0.4.0
func NewClientRepoFromClients(dbm *gorp.DbMap, cs []client.LoadableClient) (client.ClientRepo, error)
func NewHealthChecker ¶
func NewPasswordInfoRepo ¶
func NewPasswordInfoRepo(dbm *gorp.DbMap) user.PasswordInfoRepo
func NewPasswordInfoRepoFromPasswordInfos ¶ added in v0.3.0
func NewPasswordInfoRepoFromPasswordInfos(dbm *gorp.DbMap, infos []user.PasswordInfo) (user.PasswordInfoRepo, error)
func NewRefreshTokenRepo ¶
func NewRefreshTokenRepo(dbm *gorp.DbMap) refresh.RefreshTokenRepo
func NewRefreshTokenRepoWithGenerator ¶ added in v0.3.0
func NewRefreshTokenRepoWithGenerator(dbm *gorp.DbMap, gen refresh.RefreshTokenGenerator) refresh.RefreshTokenRepo
func NewUserRepoFromUsers ¶
func TransactionFactory ¶
func TransactionFactory(conn *gorp.DbMap) repo.TransactionFactory
Types ¶
type Config ¶
type Config struct { // Connection string in the format: <driver>://<username>:<password>@<host>:<port>/<database> DSN string // The maximum number of open connections to the database. The default is 0 (unlimited). // For more details see: http://golang.org/pkg/database/sql/#DB.SetMaxOpenConns MaxOpenConnections int // The maximum number of connections in the idle connection pool. The default is 0 (unlimited). // For more details see: http://golang.org/pkg/database/sql/#DB.SetMaxIdleConns MaxIdleConnections int }
type ConnectorConfigRepo ¶
type ConnectorConfigRepo struct {
// contains filtered or unexported fields
}
func NewConnectorConfigRepo ¶
func NewConnectorConfigRepo(dbm *gorp.DbMap) *ConnectorConfigRepo
func (*ConnectorConfigRepo) All ¶
func (r *ConnectorConfigRepo) All() ([]connector.ConnectorConfig, error)
func (*ConnectorConfigRepo) GetConnectorByID ¶ added in v0.2.0
func (r *ConnectorConfigRepo) GetConnectorByID(tx repo.Transaction, id string) (connector.ConnectorConfig, error)
func (*ConnectorConfigRepo) Set ¶
func (r *ConnectorConfigRepo) Set(cfgs []connector.ConnectorConfig) error
type GarbageCollector ¶
type GarbageCollector struct {
// contains filtered or unexported fields
}
func NewGarbageCollector ¶
func NewGarbageCollector(dbm *gorp.DbMap, ival time.Duration) *GarbageCollector
func (*GarbageCollector) Run ¶
func (gc *GarbageCollector) Run() chan struct{}
type PrivateKeySetRepo ¶
type PrivateKeySetRepo struct {
// contains filtered or unexported fields
}
func NewPrivateKeySetRepo ¶
type SessionKeyRepo ¶
type SessionKeyRepo struct {
// contains filtered or unexported fields
}
func NewSessionKeyRepo ¶
func NewSessionKeyRepo(dbm *gorp.DbMap) *SessionKeyRepo
func NewSessionKeyRepoWithClock ¶
func NewSessionKeyRepoWithClock(dbm *gorp.DbMap, clock clockwork.Clock) *SessionKeyRepo
func (*SessionKeyRepo) Push ¶
func (r *SessionKeyRepo) Push(sk session.SessionKey, exp time.Duration) error
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
func NewSessionRepo ¶
func NewSessionRepo(dbm *gorp.DbMap) *SessionRepo
func NewSessionRepoWithClock ¶
func NewSessionRepoWithClock(dbm *gorp.DbMap, clock clockwork.Clock) *SessionRepo
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package translate implements translation of driver specific SQL queries.
|
Package translate implements translation of driver specific SQL queries. |
Click to show internal directories.
Click to hide internal directories.