src

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandStr added in v1.0.7

func RandStr(strSize int, randType string) string

Types

type Migration

type Migration struct {
	// contains filtered or unexported fields
}

type OpenvpnUser

type OpenvpnUser struct {
	Database *sql.DB
}

func (*OpenvpnUser) AuthUser

func (oUser *OpenvpnUser) AuthUser(username, password, totp string) (bool, error)

func (*OpenvpnUser) ChangeUserPassword

func (oUser *OpenvpnUser) ChangeUserPassword(username, password string) (string, error)

func (*OpenvpnUser) CheckUserExistent

func (oUser *OpenvpnUser) CheckUserExistent(username string) bool

func (*OpenvpnUser) CreateUser

func (oUser *OpenvpnUser) CreateUser(username, password string) (string, error)

func (*OpenvpnUser) DeleteUser

func (oUser *OpenvpnUser) DeleteUser(username string, force bool) (string, error)

func (*OpenvpnUser) GetUserOtpSecret

func (oUser *OpenvpnUser) GetUserOtpSecret(username string) (string, error)

func (*OpenvpnUser) InitDb

func (oUser *OpenvpnUser) InitDb()

func (*OpenvpnUser) IsSecondFactorEnabled

func (oUser *OpenvpnUser) IsSecondFactorEnabled(username string) (bool, error)

func (*OpenvpnUser) MigrateDb

func (oUser *OpenvpnUser) MigrateDb()

func (*OpenvpnUser) PrintUsers

func (oUser *OpenvpnUser) PrintUsers(all bool)

func (*OpenvpnUser) RegisterOtpApplication

func (oUser *OpenvpnUser) RegisterOtpApplication(username, totp string) (string, error)

func (*OpenvpnUser) RegisterOtpSecret

func (oUser *OpenvpnUser) RegisterOtpSecret(username, secret string) (string, error)

func (*OpenvpnUser) ResetOtpApplication added in v1.0.7

func (oUser *OpenvpnUser) ResetOtpApplication(username string) (string, error)

func (*OpenvpnUser) RestoreUser

func (oUser *OpenvpnUser) RestoreUser(username string) (string, error)

func (*OpenvpnUser) RevokedUser

func (oUser *OpenvpnUser) RevokedUser(username string) (string, error)

type User

type User struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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