Documentation ¶
Index ¶
- Variables
- func Clean(name string, r Role, sim bool) (ok bool)
- func CleanS(s string) string
- func List(role Role) (people []string, total int, err error)
- func PeopleStmt(role Role, softDel bool) string
- func Rename(replacement, name string, r Role) (count int64, err error)
- func Trim(s string) string
- type Role
Examples ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func List ¶
List people filtered by a role.
Example ¶
package main import ( "fmt" "github.com/Defacto2/df2/pkg/people/internal/role" ) func main() { r := role.Musicians _, total, err := role.List(r) if err != nil { fmt.Print(err) } fmt.Printf("%s found? %v", r, total > 0) }
Output: musicians found? true
func PeopleStmt ¶
PeopleStmt returns a complete SQL WHERE statement for people that are filtered by roles.
Types ¶
Click to show internal directories.
Click to hide internal directories.