user

package
v0.0.0-...-8a25eb9 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RSupportConfig map[string]string
View Source
var SupportConfig []string = []string{
	"allow.net",
	"allow.domain",
	"allow.city",
	"ipset.assign",
	"ipset.access",
	"otp.sameip",
	"otp.samecity",
}

Functions

func Add

func Add(username string, password string, disableotp, randompass bool)

username:

name[%device]

password:

password

func Delete

func Delete(username string)

func Disable

func Disable(username string)

func DisconnectDevice

func DisconnectDevice(name, dev string) (total, effect int)

func Enable

func Enable(username string)

func GetDefaultConfig

func GetDefaultConfig() map[string]string

func GetFinalConfig

func GetFinalConfig(name string) map[string]string

func GetUserConfig

func GetUserConfig(name string) map[string]string

func HashPassword

func HashPassword(pass string) string

func Ifconfig

func Ifconfig(username, dev string, configs ...string)

func List

func List(usernames ...string)

func MatchPassword

func MatchPassword(pass, target string) bool

func Reconnect

func Reconnect(username string)

func Reset

func Reset(username string, password string, disableotp, randompass bool)

username:

name[%device]

password:

password

func Set

func Set(def bool, username string, configs ...string)

func Show

func Show(username string)

func StdPassword

func StdPassword(password string) (code string, pass string)

func StdUsername

func StdUsername(username string) (name string, device string)

func Verify

func Verify(username string, password string)

username:

name[%device]

password:

[code][%password]

Types

This section is empty.

Jump to

Keyboard shortcuts

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