db

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2015 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCannotDecryptKeys = errors.New("Cannot Decrypt Keys")
)

Functions

func DropMigrationsTable

func DropMigrationsTable(dbMap *gorp.DbMap) error

func GetPlannedMigrations

func GetPlannedMigrations(dbMap *gorp.DbMap) ([]*migrate.PlannedMigration, error)

func MigrateMaxMigrations

func MigrateMaxMigrations(dbMap *gorp.DbMap, max int) (int, error)

func MigrateToLatest

func MigrateToLatest(dbMap *gorp.DbMap) (int, error)

func NewClientIdentityRepo

func NewClientIdentityRepo(dbm *gorp.DbMap) client.ClientIdentityRepo

func NewClientIdentityRepoFromClients

func NewClientIdentityRepoFromClients(dbm *gorp.DbMap, clients []oidc.ClientIdentity) (client.ClientIdentityRepo, error)

func NewConnection

func NewConnection(cfg Config) (*gorp.DbMap, error)

func NewHealthChecker

func NewHealthChecker(dbm *gorp.DbMap) *healthChecker

func NewPasswordInfoRepo

func NewPasswordInfoRepo(dbm *gorp.DbMap) user.PasswordInfoRepo

func NewRefreshTokenRepo

func NewRefreshTokenRepo(dbm *gorp.DbMap) refresh.RefreshTokenRepo

func NewUserRepo

func NewUserRepo(dbm *gorp.DbMap) user.UserRepo

func NewUserRepoFromUsers

func NewUserRepoFromUsers(dbm *gorp.DbMap, us []user.UserWithRemoteIdentities) (user.UserRepo, error)

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 (*ConnectorConfigRepo) GetConnectorByID added in v0.2.0

func (r *ConnectorConfigRepo) GetConnectorByID(tx repo.Transaction, id string) (connector.ConnectorConfig, error)

func (*ConnectorConfigRepo) Set

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

func NewPrivateKeySetRepo(dbm *gorp.DbMap, useOldFormat bool, secrets ...[]byte) (*PrivateKeySetRepo, error)

func (*PrivateKeySetRepo) Get

func (r *PrivateKeySetRepo) Get() (key.KeySet, error)

func (*PrivateKeySetRepo) Set

func (r *PrivateKeySetRepo) Set(ks key.KeySet) error

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) Pop

func (r *SessionKeyRepo) Pop(key string) (string, error)

func (*SessionKeyRepo) Push

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

func (*SessionRepo) Create

func (r *SessionRepo) Create(s session.Session) error

func (*SessionRepo) Get

func (r *SessionRepo) Get(sessionID string) (*session.Session, error)

func (*SessionRepo) Update

func (r *SessionRepo) Update(s session.Session) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL