records

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 8 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRecord added in v1.7.1

func MakeRecord(k hsk.Key, obj validation.Dataer) hsk.Record

MakeRecord creates a new Record

func NewData added in v1.7.1

func NewData(obj validation.Dataer) (validation.Dataer, error)

func NewRecord added in v1.7.1

func NewRecord(t validation.Dataer) hsk.Record

Types

type Collection

type Collection interface {
	collections.Enumerable
	Get(index int) hsk.Record
	Add(rec hsk.Record) int
	Contains(rec hsk.Record) bool
	IndexOf(rec hsk.Record) int
	Insert(index int, rec hsk.Record)
	Remove(rec hsk.Record)
	RemoveAt(index int)
	Count() int
	ToSlice() []hsk.Record
}

Collection is a set of Records

func CollectionOf added in v1.7.1

func CollectionOf(t validation.Dataer) Collection

func NewCollection

func NewCollection() Collection

type Page

type Page interface {
	Add(record hsk.Record) bool
	collections.Enumerable
	Prev() string
	Next() string
	Count() int
	Any() bool
	GetRecords() Collection
}

Page represents a piece of a larger dataset.

func NewRecordPage

func NewRecordPage(pageNo, pageSize int) Page

NewRecordPage creates a data page for records

func NewResultPage added in v1.7.1

func NewResultPage(t validation.Dataer) Page

NewResultPage creates a page for JSONed records

Jump to

Keyboard shortcuts

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