authmethods

package
v0.0.0-...-b92253b Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUser

func CheckUser(dest interface{}, id, password string, args ...string) (err error)

check the user's password

func New

func New(tablename, dburl string) (err error)

// find user

func (s *LogInService) FindUser(dest interface{}, id string, args ...string) (err error) {
	args_str := strings.Join(args, ",")
	esql := fmt.Sprintf("select %v from %v where id=%v", args_str, s.table_name, id)
	// res = new(User)
	err = s.dbcon.Get(dest, esql)
	//debugline
	fmt.Println("query>> ", esql)
	return
}

Types

type LogInService

type LogInService struct {
	*database.DbController
	// contains filtered or unexported fields
}

func (*LogInService) CreateUser

func (s *LogInService) CreateUser(args map[string]string) (err error)

create user

type User

type User struct {
	Id       string
	Name     string
	Password string
}

Jump to

Keyboard shortcuts

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