Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateAuthDB ¶ added in v1.1.1
func MigrateAuthDB(db *sql.DB, dbtype DatabaseType) error
Types ¶
type AuthRepository ¶ added in v1.1.1
type AuthRepository interface { GetByUsername(username string) (*AuthEntry, error) Create(entry *AuthEntry) error Update(entry *AuthEntry) error Delete(id int64) error }
func NewAuthRepository ¶
func NewAuthRepository(db *sql.DB, dbtype DatabaseType) AuthRepository
type DatabaseType ¶
type DatabaseType string
const ( DATABASE_SQLITE DatabaseType = "sqlite" DATABASE_POSTGRES DatabaseType = "postgres" )
type PostgresAuthRepository ¶ added in v1.1.1
type PostgresAuthRepository struct {
// contains filtered or unexported fields
}
func (*PostgresAuthRepository) Create ¶ added in v1.1.1
func (repo *PostgresAuthRepository) Create(entry *AuthEntry) error
func (*PostgresAuthRepository) Delete ¶ added in v1.1.1
func (repo *PostgresAuthRepository) Delete(id int64) error
func (*PostgresAuthRepository) GetByUsername ¶ added in v1.1.1
func (repo *PostgresAuthRepository) GetByUsername(username string) (*AuthEntry, error)
func (*PostgresAuthRepository) Update ¶ added in v1.1.1
func (repo *PostgresAuthRepository) Update(entry *AuthEntry) error
type PrivRepository ¶ added in v1.1.1
type PrivRepository struct {
// contains filtered or unexported fields
}
func NewPrivilegeRepository ¶
func NewPrivilegeRepository(db *sql.DB, dbtype DatabaseType) *PrivRepository
func (*PrivRepository) Create ¶ added in v1.1.1
func (repo *PrivRepository) Create(entry *PrivilegeEntry) error
func (*PrivRepository) Delete ¶ added in v1.1.1
func (repo *PrivRepository) Delete(id int64, privilege string) error
func (*PrivRepository) GetByID ¶ added in v1.1.1
func (repo *PrivRepository) GetByID(id int64) ([]*PrivilegeEntry, error)
type PrivilegeEntry ¶
type SqliteAuthRepository ¶ added in v1.1.1
type SqliteAuthRepository struct {
// contains filtered or unexported fields
}
func (*SqliteAuthRepository) Create ¶ added in v1.1.1
func (repo *SqliteAuthRepository) Create(entry *AuthEntry) error
func (*SqliteAuthRepository) Delete ¶ added in v1.1.1
func (repo *SqliteAuthRepository) Delete(id int64) error
func (*SqliteAuthRepository) GetByUsername ¶ added in v1.1.1
func (repo *SqliteAuthRepository) GetByUsername(username string) (*AuthEntry, error)
func (*SqliteAuthRepository) Update ¶ added in v1.1.1
func (repo *SqliteAuthRepository) Update(entry *AuthEntry) error
Click to show internal directories.
Click to hide internal directories.