util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPaginationOptsFromContext

func GetPaginationOptsFromContext(ctx context.Context, opts ...PaginationOpt) (int, int)

GetPaginationOptsFromContext gets the limit and offset from the context

func IsNilInterfaceOrPointer

func IsNilInterfaceOrPointer(sth interface{}) bool

IsNilInterfaceOrPointer checks if the given interface is nil or if it is a pointer and the pointer is nil.

Types

type PaginationOpt added in v0.2.4

type PaginationOpt func(*PaginationOpts)

func WithDefaultLimit added in v0.2.4

func WithDefaultLimit(defaultLimit int) PaginationOpt

WithDefaultLimit sets the default limit for pagination

type PaginationOpts added in v0.2.4

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

Jump to

Keyboard shortcuts

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