Documentation
¶
Index ¶
- Constants
- Variables
- func CheckDb() (error, *sql.DB)
- func CheckPasswordValidity(password, hash string) bool
- func CloseDbConn() error
- func CreateJwtToken(userId string) string
- func CreateUser(user models.User) (string, error)
- func DeletePoll(id string) error
- func GetAllPollsForUser(pollFilters models.PollFilters) ([]models.Poll, error)
- func GetPollById(pollUuid string) (models.Poll, error)
- func GetPort() int
- func GetUserByEmail(email string) (*models.User, error)
- func GetUserById(userId string) (*models.User, error)
- func HandleError(err error, w *http.ResponseWriter)
- func InsertNewPoll(poll models.Poll) error
- func OpenDbConnection() error
- func ParseJwtToken(tokenString string) (string, float64)
- func UpdatePoll(id string, poll models.Poll) error
Constants ¶
View Source
const JWT_SECRET = "asfbgakjl;gawobi;ioragjewgnVENBVRWOB"
Variables ¶
View Source
var Logger = httplog.NewLogger("poll-api")
Functions ¶
func CheckPasswordValidity ¶
func CloseDbConn ¶
func CloseDbConn() error
func CreateJwtToken ¶
func DeletePoll ¶
func GetAllPollsForUser ¶
func GetAllPollsForUser(pollFilters models.PollFilters) ([]models.Poll, error)
func HandleError ¶
func HandleError(err error, w *http.ResponseWriter)
func InsertNewPoll ¶
func OpenDbConnection ¶
func OpenDbConnection() error
func ParseJwtToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.