people

package
v1.1.30 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package people deals with people, person names, aliases and their roles.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFilter = errors.New("invalid filter used")
	ErrRole   = errors.New("unknown role")
)

Functions

func DataList

func DataList(filename string, r Request) error

DataList prints an auto-complete list for HTML input elements.

func Filters

func Filters() []string

Filters is a Role slice for use with the Cobra filterFlag.

func Fix added in v1.1.18

func Fix(simulate bool) error

Fix any malformed group names found in the database.

func HTML

func HTML(filename string, r Request) error

HTML prints a snippet listing links to each person.

func List

func List(role Role) (people []string, total int, err error)

List people filtered by a role.

func Print

func Print(r Request) error

Print lists people filtered by a role and summaries the results.

func Roles

func Roles() string

Roles or jobs of people.

Types

type Person

type Person struct {
	// ID used in URLs to link to the person.
	ID string
	// Nick of the person.
	Nick string
	// Inject a HR element to separate a collection of groups.
	Hr bool
}

Person data.

type Request

type Request struct {
	// Filter people by category.
	Filter string
	// Counts the person's total files.
	Counts bool
	// Progress counter when requesting database data.
	Progress bool
}

Request flags for people functions.

type Role

type Role int

Role or jobs to categories and filter people.

const (
	// Everyone displays all people.
	Everyone Role = iota
	// Artists are graphic or video.
	Artists
	// Coders are programmers.
	Coders
	// Musicians create music or audio.
	Musicians
	// Writers for the documents.
	Writers
)

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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