inmemory

package
v0.0.0-...-3ab664a Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllPackages

type AllPackages map[CategoryName][]Package

func (AllPackages) GetCategories

func (a AllPackages) GetCategories() []CategoryName

func (AllPackages) GetPackageByName

func (a AllPackages) GetPackageByName(name string) Package

TODO optimize this

func (AllPackages) GetPackagesByCategory

func (a AllPackages) GetPackagesByCategory(category CategoryName) []Package

func (AllPackages) GetPackagesByCategoryNumber

func (a AllPackages) GetPackagesByCategoryNumber(query string) ([]Package, error)

func (AllPackages) GetTopPackagesSortedByStars

func (a AllPackages) GetTopPackagesSortedByStars(query string) []Package

TODO optimize this

type CategoryName

type CategoryName string

type Package

type Package struct {
	Name     string             `bson:"name" json:"name"`
	URL      string             `bson:"url" json:"url"`
	Info     string             `bson:"info" json:"info"`
	Stars    int                `bson:"stars" json:"stars"`
	Category string             `bson:"title" json:"title"`
	ID       primitive.ObjectID `bson:"_id" json:"id,omitempty"`
}

Jump to

Keyboard shortcuts

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