utils

package
v0.0.0-...-cf20ef5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertInterfacesToSlice

func ConvertInterfacesToSlice(arr []interface{}) []string

func ConvertPrimitiveToSlice

func ConvertPrimitiveToSlice(arr primitive.A) []string

func HashPassword

func HashPassword(password string) ([]byte, error)

func SomeElementInSlice

func SomeElementInSlice(slice1, slice2 []string) bool

func VerifyPassword

func VerifyPassword(password string, hashedPassword []byte) bool

Types

type Result

type Result struct {
	Docs          []bson.M
	TotalDocs     int64
	Limit         int64
	Page          int64
	TotalPages    int64
	HasNextPage   bool
	NextPage      *int64
	HasPrevPage   bool
	PrevPage      *int64
	PagingCounter int64
}

func PaginateAggregate

func PaginateAggregate(collection *mongo.Collection, pipeline []interface{}, page, limit int64, collation *options.Collation) (result *Result, err error)

Jump to

Keyboard shortcuts

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