group

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 8 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) (int, error)

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

func List

func List(s string) (groups []string, total int, err error)

List all organisations or groups filtered by s.

func SQLFilter

func SQLFilter(f Filter) (string, error)

SQLFilter returns a partial SQL WHERE statement to filter groups.

func SQLSelect

func SQLSelect(f Filter, includeSoftDeletes bool) (string, error)

SQLSelect returns a complete SQL WHERE statement where the groups are filtered.

func SQLWhere

func SQLWhere(f Filter, includeSoftDeletes bool) (string, error)

SQLWhere returns a partial SQL WHERE statement where groups are filtered.

func Slug

func Slug(s string) string

Slug takes a string and makes it into a URL friendly slug.

func UseHr

func UseHr(prevLetter, group string) (string, bool)

Use a HR element to mark out the groups alphabetically.

Types

type Filter

type Filter int

Filter group by role or function.

const (
	None     Filter = iota // None returns all groups.
	BBS                    // BBS boards.
	FTP                    // FTP sites.
	Group                  // Group generic roles.
	Magazine               // Magazine publishers.
)

func Get

func Get(s string) Filter

Get the Filter type from s.

func (Filter) String

func (f Filter) String() string

type Request

type Request 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.
}

Request flags for group functions.

Jump to

Keyboard shortcuts

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