mysql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (db *sql.DB)

Connect establishes a connection to the MySQL database

func CountTableColumns

func CountTableColumns(table string) int

CountTableColumns counts the number of columns in a table in the MySQL database

func CreateTable

func CreateTable(number int) (db *sql.DB)

CreateTable creates a table in the MySQL database using SQL queries from a file

func DeleteBoard

func DeleteBoard(email, board string)

func DeleteProject

func DeleteProject(email, board, project string)

func DeleteWorkspace

func DeleteWorkspace(value [2]string)

func FindAccount

func FindAccount(email, password string) (string, string, string, bool)

FindAccount finds an account with the given email and password. It returns the email, password, status, and a boolean indicating if the account was found.

func FindBoard

func FindBoard(email, board string) string

FindBoard finds a board with the given email and board name. It returns the board name if found, otherwise an empty string.

func FindDepartment

func FindDepartment(email string) [2]string

FindDepartment finds the department associated with the given email. It returns the email and department as a string array.

func FindMember

func FindMember(email, password string) ([4]string, bool)

FindMember finds a member with the given email and password. It returns member credentials and a boolean indicating if the member was found.

func FindProfile

func FindProfile(email string) bool

FindProfile checks if a profile exists for the given email. It returns a boolean indicating if the profile exists.

func FindProject

func FindProject(email, board, project string) string

func FindRole

func FindRole(email string) [2]string

FindRole finds the role associated with the given email. It returns the email and role as a string array.

func FindWorkspace

func FindWorkspace(email string) string

FindWorkspace finds workspaces associated with the given email. It returns a string containing the list of workspace names.

func FindWorkspaceName

func FindWorkspaceName(email, name string) string

FindWorkspaceName finds the workspace with the given email and name. It returns the workspace name if found, otherwise an empty string.

func InsertBoard

func InsertBoard(email, board string)

InsertBoard inserts board data into the database.

func InsertDepartment

func InsertDepartment(email, department string)

InsertDepartment inserts department data into the database.

func InsertMemberData

func InsertMemberData(email string)

InsertMemberData inserts member data into the database.

func InsertProfileData

func InsertProfileData(value [5]string)

InsertProfileData inserts profile data into the database.

func InsertProject

func InsertProject(email, board, project, person, status, date string)

func InsertRole

func InsertRole(email, role string)

InsertRole inserts role data into the database.

func InsertSignupData

func InsertSignupData(value [4]string)

InsertSignupData inserts signup data into the database.

func InsertWorkspaceData

func InsertWorkspaceData(value [2]string)

InsertWorkspaceData inserts workspace data into the database.

func ListProfileInfo

func ListProfileInfo(email string) string

ListProfileInfo lists profile information for the given email. It returns an empty string.

func ListUserInfo

func ListUserInfo(email, password string) string

ListUserInfo lists user information for the given email and password. It returns an empty string.

func UpdateBoard

func UpdateBoard(email, oldBoard, newBoard string)

UpdateBoard updates board information in the Boards table

func UpdateDepartment

func UpdateDepartment(email, dep string)

UpdateDepartment updates department information in the Departments table

func UpdateMember

func UpdateMember(value [8]string, email, password string, isSet bool)

UpdateMember updates member information in the Members table

func UpdateProfile

func UpdateProfile(value [4]string, email string)

UpdateProfile updates profile information in the Profiles table

func UpdateProject

func UpdateProject(value [3]string, boardName, projectName string)

func UpdateRole

func UpdateRole(email, role string)

UpdateRole updates role information in the Roles table

func UpdateUser

func UpdateUser(value [4]string, email, password string)

UpdateUser updates user information in the Signup table

func UpdateWorkspace

func UpdateWorkspace(value [3]string)

UpdateWorkspace updates workspace information in the Workspaces table

Types

type ProfileCredentials

type ProfileCredentials struct {
	Title          string
	Phone          string
	Location       string
	Working_status string
}

type UserCredentials

type UserCredentials struct {
	Email       string
	Password    string
	Status      string
	FullName    string
	AccountName string
}

Jump to

Keyboard shortcuts

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