groups

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Count

func Count(name string) (count int, err error)

Count returns the number of file entries associated with a group.

func Cronjob

func Cronjob() error

Cronjob is used for system automation to generate dynamic HTML pages.

func Fix

func Fix(simulate bool) error

Fix any malformed group names found in the database.

func Initialism

func Initialism(name string) (string, error)

Initialism returns a named group initialism or acronym.

func MakeSlug

func MakeSlug(name string) string

MakeSlug takes a name and makes it into a URL friendly slug.

func Print

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

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

func Variations

func Variations(name string) (vars []string, err error)

Variations creates format variations for a named group.

func Wheres

func Wheres() []string

Wheres are group categories.

Types

type Filter

type Filter int
const (
	None Filter = iota
	BBS
	FTP
	Group
	Magazine
)

func (Filter) String

func (f Filter) String() string

type Request

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

Request flags for group functions.

func (Request) DataList

func (r Request) DataList(filename string) error

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

func (Request) HTML

func (r Request) HTML(filename string) error

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

type Result

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

Result on a group.

Jump to

Keyboard shortcuts

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