contacts

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db *sql.DB, teamI int) (id, teamO int, err error)

func ChooseField

func ChooseField(info string) string

ChooseField asks user to choose a field in contacts table

func Delete

func Delete(db *sql.DB, id int) error

func GetFieldFromAllFieldsByID

func GetFieldFromAllFieldsByID(db *sql.DB, id int, fld string) ([]string, error)

GetFieldFromAllFieldsByID get matched fields when a field exactly matched by ID

func GetIDFromAllNames

func GetIDFromAllNames(db *sql.DB, name string) (int, error)

GetIDFromAllNames gets ID when name contained in nick

func GetIDnFieldFromAllFields

func GetIDnFieldFromAllFields(db *sql.DB, fld string) (int, []string, error)

GetIDnFieldFromAllFields gets ID and matched field names when a field exactly matched

func GetLdap

func GetLdap(db *sql.DB, id string) (string, error)

GetLdap gets ldap from ID

func GetMail

func GetMail(db *sql.DB, id string) (string, error)

GetMail gets contact mail from ID

func GetMembers

func GetMembers(db *sql.DB, id int) ([][]string, error)
used by leaders only

return values: [][0] ID, [][1] Name

func GetName

func GetName(db *sql.DB, id string) (string, error)

GetName gets contact name from ID

func List

func List(db *sql.DB, team int) error

List shows all members' info of a team

func ListFieldsFrmMap

func ListFieldsFrmMap(db *sql.DB, id int, flds map[string]string, changedOnly bool) (changedFlds []string)

ListFieldsFrmMap prints contact info out of the map.

If changedOnly is true, db and id will be used to get current values and

prints changed info only.

func MakeLeader

func MakeLeader(db *sql.DB, id, team int) error

func Modify

func Modify(db *sql.DB, id int) error

To modify a record

Types

This section is empty.

Jump to

Keyboard shortcuts

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