package
0.0.0-20241209065451-e81591de95ec
Repository: https://github.com/danmuck/the_cookie_jar.git
Documentation: pkg.go.dev
# Functions
Adds a classroom to the database.
Adds a comment to the database.
Adds a reference to on-disk media to the database, allowing you to specify the
id of this media..
Adds a reference to on-disk media to the database.
Adds a thread to the database.
Adds a user to the database.
Deletes a users PFP from the disk and media database.
Generates a JWT (authentication) token and returns it, but also updates JWT
token for the user in the database.
Gets a classroom model from the database.
Grabs desired collection from MongoDB database.
Gets a comment model from the database.
Gets media model from the database.
Grabs path of on-disk media.
Gets a thread model from the database.
Gets user model from the database.
Gets path of user's PFP
*/.
Gets user model from the database.
Returns true/false if a user liked a comment ID, also does the opposite action
of what they did.
Returns nil/error if the given username is the author of the given comment ID.
Removes media model from the database.
Removes media model from the database and from disk.
Will search for the classroom and user in the database and then add/remove a
classroom for them.
Will search for the classroom in the database and then add a thread in it.
Will search for the comment in the database and then change its text.
Will search for the thread in the database and then add a comment in it.
Will search for the user in the database based on given username then update
their authentication token.
Will search for the user in the database based on given username then
add/remove a classroom for them.
Will search for the user in the database based on given username then
update their media ID reference (pfpID)
*/.
Returns nil if user has no PFP ID associated with them.
Returns nil if given authentication token, when hashed, matches the
authentication token hash associated with the given username in the database.
Returns nil if given password matches the password associated with the given
username in the database.