database

package
v0.0.0-...-6837ffc Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB

Functions

func AddAccount

func AddAccount(handle string, pass string, display string, email string, misc string, db *sql.DB) error

func AddDowndoot

func AddDowndoot(postid string, userid string, db *sql.DB)

func AddPost

func AddPost(postTitle string, creatorId string, contentType string, content string, db *sql.DB)

func AddUpdoot

func AddUpdoot(postid string, userid string, db *sql.DB)

func CatchAndClose

func CatchAndClose(db *sql.DB)

func ChangePass

func ChangePass(handle string, hashPass string, newhashPass string, db *sql.DB) error

func CheckIfDooted

func CheckIfDooted(postid string, userid string, db *sql.DB) (bool, bool)

CheckIfDooted outputs REMINDER TO REFACTOR THIS: first bool output: if the post exists ??? second bool output: if the user voted

func ConfirmCred

func ConfirmCred(handle string, pass string, db *sql.DB) (bool, error)

func ConfirmPost

func ConfirmPost(postid string, db *sql.DB) bool

func ConnectToDB

func ConnectToDB() (*sql.DB, error)

func CreateTableAccounts

func CreateTableAccounts(db *sql.DB)

func CreateTablePosts

func CreateTablePosts(db *sql.DB)

func DoesPostExist

func DoesPostExist(postid string, db *sql.DB) bool

func DropTableAccounts

func DropTableAccounts(db *sql.DB)

func DropTablePosts

func DropTablePosts(db *sql.DB)

func EditPostContent

func EditPostContent(postid string, edit string, db *sql.DB) bool

func GeneratePostID

func GeneratePostID(creatorID string) string

func GetAccountAvailability

func GetAccountAvailability(handle string, db *sql.DB) (bool, error)

func GetDisplayName

func GetDisplayName(handle string, db *sql.DB) (string, error)

func GetEmail

func GetEmail(handle string, db *sql.DB) (string, error)

func GetPassByHandle

func GetPassByHandle(handle string, db *sql.DB) string

func GetPostDetails

func GetPostDetails(postid string, db *sql.DB) (string, string, string, string, string, int, int, string)

func GetPostIDByTitle

func GetPostIDByTitle(postTitle string, loc int, db *sql.DB) (string, bool)

func GetPostIDByUser

func GetPostIDByUser(creatorId string, loc int, db *sql.DB) (string, bool)

func HashData

func HashData(inputPass string) string

func InitVote

func InitVote(db *sql.DB)

func PrintPosts

func PrintPosts(db *sql.DB)

func PrintSheet

func PrintSheet(db *sql.DB)

func RmAccount

func RmAccount(handle string, hashPass string, db *sql.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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