package
0.0.0-20191117111430-f212a9ec17c8
Repository: https://github.com/shanmugharajk/qanet.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
AddBookmark adds the post id and user id in bookmarks table, returns no of rows affected and the error.
Actions.
No description provided by the author
CreateUser creates a new user and also has the encryption logic.
No description provided by the author
DeleteBookmark deletes the post from the bookmarks list of the user and returns the current number of bookmark.
No description provided by the author
FirstOrCreateNormalUser gets the details with role as 'NORMAL_USER' If there is no records available it will create a role.
No description provided by the author
No description provided by the author
No description provided by the author
GetAnswers returns the answers for the question along with 5 comments in each.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
To write query for fetching answer post with 0 or 5 vote written this way to reuse the function.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DB is a connection to your database to be used throughout your application.
DbConnection is a gorm orm instance.
Roles - different user roles.
# Structs
No description provided by the author
No description provided by the author
Base model for all model structs.
No description provided by the author
No description provided by the author
No description provided by the author
Question is the model for questions table.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
VoteResponse is the response object for Vote handler.