Documentation ¶
Index ¶
- Variables
- func Connect()
- func GetEntries(first int64, cursor *primitive.ObjectID) ([]*model.DBEntry, error)
- func GetEntryByHash(hash string) (*model.DBEntry, error)
- func GetEntryByID(id primitive.ObjectID) (*model.DBEntry, error)
- func GetListByID(id primitive.ObjectID) (*model.DBHashList, error)
- func GetListByName(name string) (*model.DBHashList, error)
- func GetLists(first int64, cursor *primitive.ObjectID) ([]*model.DBHashList, error)
- func GetUserByID(id primitive.ObjectID) (*model.DBUser, error)
- func GetUserByUsername(username string) (*model.DBUser, error)
- func GetUsers(first int64, cursor *primitive.ObjectID) ([]*model.DBUser, error)
- func SaveEntry(entry *model.DBEntry) error
- func SaveList(list *model.DBHashList) error
- func SaveUser(user *model.DBUser) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *mongo.Database
View Source
var DbClient *mongo.Client
Functions ¶
func GetEntries ¶
func GetListByID ¶
func GetListByID(id primitive.ObjectID) (*model.DBHashList, error)
func GetListByName ¶
func GetListByName(name string) (*model.DBHashList, error)
func SaveList ¶
func SaveList(list *model.DBHashList) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.