request

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(r Flags) (total int, err error)

Print list organisations or groups filtered by a name and summaries the results.

Types

type Flags

type Flags struct {
	Filter      string // Filter groups by category.
	Counts      bool   // Counts the group's total files.
	Initialisms bool   // Initialisms and acronyms for groups.
	Progress    bool   // Progress counter when requesting database data.
}

Flags for group functions.

func (Flags) DataList

func (r Flags) DataList(name string) error

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

func (Flags) Files

func (r Flags) Files(name string) (int, error)

Files returns the number of files associated with the named group.

func (Flags) HTML

func (r Flags) HTML(name string) error

HTML prints a snippet listing links to each group, with an optional file count.

func (Flags) Initialism

func (r Flags) Initialism(name string) (string, error)

Initialism returns the initialism of the named group.

func (Flags) Parse

func (r Flags) Parse(name, tmpl string) error

Parse the group template and save it to the named file. If the named file is empty, the results will be sent to stdout.

type Result

type Result struct {
	ID         string // ID used in URLs to link to the group.
	Name       string // Name of the group.
	Count      int    // Count file totals.
	Initialism string // Initialism or acronym.
	Hr         bool   // Inject a HR element to separate a collection of groups.
}

Result on a group.

Jump to

Keyboard shortcuts

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