table

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PaginationOptions = []int{20, 50, 100}

Functions

This section is empty.

Types

type RowLoader

type RowLoader func() ([]interface{}, int, error)

type Table

type Table struct {
	ItemType          interface{}
	TableName         string
	Items             []interface{}
	TypeName          string
	PublicPath        string
	RowsPerPage       int
	SortOrder         constants.SortOrder
	TotalItemCount    int
	CurrentItemStart  int
	CurrentItemEnd    int
	CurrentPage       int
	NumberOfPages     int
	PaginationOptions []int
	Search            *entities.Search
	CSVFormattable    bool
}

func New

func New(
	t string,
	itemType interface{},
	search *entities.Search,
	loader RowLoader,
) (*Table, error)

Jump to

Keyboard shortcuts

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