mongodb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongodb

type Mongodb struct {
	// contains filtered or unexported fields
}

func (Mongodb) DeleteAll

func (db Mongodb) DeleteAll(user expiraBot.User) bool

Delete all books from a user Return true if the operations was successful, false otherwise

func (Mongodb) DeleteBook

func (db Mongodb) DeleteBook(book expiraBot.Books) bool

Delete a specific book in the mongo database Return true if the operations was successful, false otherwise

func (Mongodb) GetBooks

func (db Mongodb) GetBooks(user expiraBot.User) []expiraBot.Books

Delete all books from a user Return true if the operations was successful, false otherwise

func (Mongodb) GetUserInfoById

func (db Mongodb) GetUserInfoById(userId int64) expiraBot.User

Delete a specific book in the mongo database Return true if the operations was successful, false otherwise

func (Mongodb) InsertBook

func (db Mongodb) InsertBook(book expiraBot.Books) bool

Insert a new book in the mongo database Return true if the operations was successful, false otherwise

func (Mongodb) InsertUser

func (db Mongodb) InsertUser(user expiraBot.User) bool

Insert a new user in the mongo database Return true if the operations was successful, false otherwise

func (*Mongodb) Start

func (db *Mongodb) Start(url string) func()

Starts a connection with the mongodb database Returns a function that close the connection

func (Mongodb) Update

func (db Mongodb) Update(books []expiraBot.Books) bool

Update the books using the crawler on the bu website Return true if the operations was successful, false otherwise

Jump to

Keyboard shortcuts

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