util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMongoId = errors.New("invalid mongo id")

Functions

func GetPaginationOptsFromContext

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

GetPaginationOptsFromContext gets the limit and offset from the context

func GetTLSConfig

func GetTLSConfig(certificatePath string) (*tls.Config, error)

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.

func StringToObjectId

func StringToObjectId(ids ...string) ([]primitive.ObjectID, error)

StringToObjectId converts a string to a primitive.ObjectID

Types

This section is empty.

Jump to

Keyboard shortcuts

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