db

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbClient *mongo.Client

Functions

func Connect

func Connect()

func GetEntries

func GetEntries(first int64, cursor *primitive.ObjectID) ([]*model.DBEntry, error)

func GetEntryByHash

func GetEntryByHash(hash string) (*model.DBEntry, error)

func GetEntryByID

func GetEntryByID(id primitive.ObjectID) (*model.DBEntry, error)

func GetListByID

func GetListByID(id primitive.ObjectID) (*model.DBHashList, error)

func GetListByName

func GetListByName(name string) (*model.DBHashList, error)

func GetLists

func GetLists(first int64, cursor *primitive.ObjectID) ([]*model.DBHashList, error)

func GetUserByID

func GetUserByID(id primitive.ObjectID) (*model.DBUser, error)

func GetUserByUsername

func GetUserByUsername(username string) (*model.DBUser, error)

func GetUsers

func GetUsers(first int64, cursor *primitive.ObjectID) ([]*model.DBUser, error)

func SaveEntry

func SaveEntry(entry *model.DBEntry) error

func SaveList

func SaveList(list *model.DBHashList) error

func SaveUser

func SaveUser(user *model.DBUser) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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