Documentation ¶
Index ¶
- Variables
- func HostEquals(a, b string) bool
- func ListHosts() ([]pgpass.Entry, error)
- func RandString(length int) string
- func StringWithCharset(length int, charset string) string
- type DBConfig
- type DBConn
- func (conn *DBConn) AddRole(tx *sqlx.Tx, username string, roles []string) error
- func (conn *DBConn) CreateUser(username string, validDuration time.Duration, roles []string) (string, time.Time, error)
- func (conn *DBConn) DeleteUser(username string) error
- func (conn *DBConn) ExtendUser(username string, validDuration time.Duration) (time.Time, error)
- func (conn *DBConn) GetAllRoles() ([]string, error)
- func (conn *DBConn) GetAllUsers() ([]User, error)
- func (conn *DBConn) GetUser(username string) (*User, error)
- func (conn *DBConn) ResetPassword(username string) (string, error)
- func (conn *DBConn) RoleExist(role string) (bool, error)
- func (conn *DBConn) SetPassword(username string, password string) (string, error)
- func (conn *DBConn) UserExist(username string) (bool, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var TryDomain = "hiper.dk"
TryDomain is current just set to hiper.dk since I work at hiper
Functions ¶
func HostEquals ¶
func RandString ¶ added in v1.0.9
func StringWithCharset ¶
Types ¶
type DBConfig ¶
func MakeDbConfig ¶
type DBConn ¶
type DBConn struct { Config *DBConfig // contains filtered or unexported fields }
func (*DBConn) CreateUser ¶
func (*DBConn) DeleteUser ¶
func (*DBConn) ExtendUser ¶
func (*DBConn) GetAllRoles ¶
func (*DBConn) GetAllUsers ¶
func (*DBConn) SetPassword ¶ added in v1.0.9
Click to show internal directories.
Click to hide internal directories.