collection

package
v0.0.0-...-db6235c Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

func New

func New() Collection

func (*Collection) Add

func (c *Collection) Add(item any)

func (Collection) Data

func (c Collection) Data() []any

func (Collection) First

func (c Collection) First() any

func (Collection) Len

func (c Collection) Len() int

func (Collection) Metadata

func (c Collection) Metadata() Metadata

func (*Collection) Remove

func (c *Collection) Remove(item interface{})

func (*Collection) SetMetadata

func (c *Collection) SetMetadata(page uint32, pageSize uint32, total uint32) Collection

func (Collection) Transform

func (c Collection) Transform(fn func(any) any) Collection

type Metadata

type Metadata struct {
	Page       uint32
	PageSize   uint32
	TotalPages uint32
	Total      uint32
}

Jump to

Keyboard shortcuts

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