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
}
Click to show internal directories.
Click to hide internal directories.