Documentation
¶
Index ¶
- Constants
- func CreateDatabaseUsersTableIfNotExists(databasePtr *sql.DB) error
- func CreateUserToDatabaseUsersTableAndResponseJsonOfUser(databasePtr *sql.DB) gin.HandlerFunc
- func DeleteUserFromDatabaseUsersTableAndResponseJsonOfUserName(databasePtr *sql.DB) gin.HandlerFunc
- func ResponseJsonOfAllUsersFromDatabaseUsersTable(databasePtr *sql.DB) gin.HandlerFunc
- func ResponseJsonOfUserFromDatabaseUsersTable(databasePtr *sql.DB) gin.HandlerFunc
- func UpdateUserPasswordInDatabaseUsersTableAndResponseJsonOfUser(databasePtr *sql.DB) gin.HandlerFunc
- type Status
- type User
Constants ¶
const (
DatabaseUsersTableName = "users"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDatabaseUsersTableIfNotExists ¶
CreateDatabaseUsersTableIfNotExists creates a table named 'users' for the given database pointer if the table has not already existed.
func CreateUserToDatabaseUsersTableAndResponseJsonOfUser ¶
func CreateUserToDatabaseUsersTableAndResponseJsonOfUser(databasePtr *sql.DB) gin.HandlerFunc
CreateUserToDatabaseUsersTableAndResponseJsonOfUser creates the user given in the context to the database table 'users'. Also, it responses to the client the json of the given user.
func DeleteUserFromDatabaseUsersTableAndResponseJsonOfUserName ¶
func DeleteUserFromDatabaseUsersTableAndResponseJsonOfUserName(databasePtr *sql.DB) gin.HandlerFunc
DeleteUserFromDatabaseUsersTableAndResponseJsonOfUserName deletes the user whose name is given in the context parameter from the database table 'users'. Also, it responses to the client the json of the given user name.
func ResponseJsonOfAllUsersFromDatabaseUsersTable ¶
func ResponseJsonOfAllUsersFromDatabaseUsersTable(databasePtr *sql.DB) gin.HandlerFunc
ResponseJsonOfAllUsersFromDatabaseUsersTable responses to the client the json of all users from the database table 'users'.
func ResponseJsonOfUserFromDatabaseUsersTable ¶
func ResponseJsonOfUserFromDatabaseUsersTable(databasePtr *sql.DB) gin.HandlerFunc
ResponseJsonOfUserFromDatabaseUsersTable responses to the client the json of the user given in the context parameter from the database table 'users'.
func UpdateUserPasswordInDatabaseUsersTableAndResponseJsonOfUser ¶
func UpdateUserPasswordInDatabaseUsersTableAndResponseJsonOfUser(databasePtr *sql.DB) gin.HandlerFunc
UpdateUserPasswordInDatabaseUsersTableAndResponseJsonOfUser updates the password of the user in the database table 'users' whose name is given in the context parameter and the requested JSON object. Also, it responses to the client the json of the given user.