gormutil

package
v0.0.0-...-772bc38 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MulanPSL-2.0 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