Documentation ¶
Index ¶
- Constants
- func MigrateAuthDB(db *sql.DB, dbtype types.DatabaseType) error
- type AuthEntry
- type AuthRepository
- func (repo *AuthRepository) Count(s *AuthSearch) (int, error)
- func (repo *AuthRepository) Create(entry *AuthEntry) error
- func (repo *AuthRepository) Delete(id int64) error
- func (repo *AuthRepository) GetByUsername(username string) (*AuthEntry, error)
- func (repo *AuthRepository) Search(s *AuthSearch) ([]*AuthEntry, error)
- func (repo *AuthRepository) Update(entry *AuthEntry) error
- type AuthSearch
- type OrderColumnType
- type OrderDirectionType
- type PrivRepository
- type PrivilegeEntry
Constants ¶
View Source
const ( LastLogin OrderColumnType = "last_login" Name OrderColumnType = "name" Ascending OrderDirectionType = "asc" Descending OrderDirectionType = "desc" )
Variables ¶
This section is empty.
Functions ¶
func MigrateAuthDB ¶
func MigrateAuthDB(db *sql.DB, dbtype types.DatabaseType) error
Types ¶
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
func NewAuthRepository ¶
func NewAuthRepository(db *sql.DB, dbtype types.DatabaseType) *AuthRepository
func (*AuthRepository) Count ¶
func (repo *AuthRepository) Count(s *AuthSearch) (int, error)
func (*AuthRepository) Create ¶
func (repo *AuthRepository) Create(entry *AuthEntry) error
func (*AuthRepository) Delete ¶
func (repo *AuthRepository) Delete(id int64) error
func (*AuthRepository) GetByUsername ¶
func (repo *AuthRepository) GetByUsername(username string) (*AuthEntry, error)
func (*AuthRepository) Search ¶
func (repo *AuthRepository) Search(s *AuthSearch) ([]*AuthEntry, error)
func (*AuthRepository) Update ¶
func (repo *AuthRepository) Update(entry *AuthEntry) error
type AuthSearch ¶
type AuthSearch struct { Usernamelike *string `json:"usernamelike"` Username *string `json:"username"` Limit *int `json:"limit"` OrderColumn *OrderColumnType `json:"order_column"` OrderDirection *OrderDirectionType `json:"order_direction"` }
type OrderColumnType ¶ added in v1.1.28
type OrderColumnType string
type OrderDirectionType ¶ added in v1.1.28
type OrderDirectionType string
type PrivRepository ¶
type PrivRepository struct {
// contains filtered or unexported fields
}
func NewPrivilegeRepository ¶
func NewPrivilegeRepository(db *sql.DB, dbtype types.DatabaseType) *PrivRepository
func (*PrivRepository) Create ¶
func (repo *PrivRepository) Create(entry *PrivilegeEntry) error
func (*PrivRepository) Delete ¶
func (repo *PrivRepository) Delete(id int64, privilege string) error
func (*PrivRepository) GetByID ¶
func (repo *PrivRepository) GetByID(id int64) ([]*PrivilegeEntry, error)
type PrivilegeEntry ¶
Click to show internal directories.
Click to hide internal directories.