gormutil

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 0 Imported by: 0

Documentation

Overview

Package gormutil is a util to convert offset and limit to default values.

Index

Constants

View Source
const DefaultLimit = 1000

DefaultLimit define the default number of records to be retrieved.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitAndOffset

type LimitAndOffset struct {
	Offset int
	Limit  int
}

LimitAndOffset contains offset and limit fields.

func Unpointer

func Unpointer(offset *int64, limit *int64) *LimitAndOffset

Unpointer fill LimitAndOffset with default values if offset/limit is nil or it will be filled with the passed value.

Jump to

Keyboard shortcuts

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