Documentation ¶
Index ¶
- Variables
- func GeneratePasswordHash(pass string) ([]byte, error)
- func IsEnumValue(enum []string, value string) bool
- type AddAttendanceRequestModel
- type CreateTaskRequestModel
- type CreateTaskResponseModel
- type DeleteCommentRequestModel
- type DeleteProjectRequestModel
- type DeleteTaskRequestModel
- type DeleteUserRequestModel
- type GetCommentsRequestModel
- type GetTasksRequestModel
- type GetUserAttendanceRequestModel
- type GetWithIDRequestModel
- type LoginRequestModel
- type LoginResponseModel
- type RegisterResponseModel
- type StartOrFinishTaskRequestModel
- type TokenMetadata
- type Tokens
- type UpdatePasswordRequestModel
- type UpdateProjectStatusRequestModel
- type UpdateTaskStatusRequestModel
- type WriteCommentRequestModel
- type WriteCommentResponseModel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Register = `` /* 131-byte string literal not displayed */ Login = ` SELECT password FROM users WHERE phone = $1 ` GetProgrammers = ` SELECT * FROM users WHERE position = 'programmer' ` GetProgrammer = ` SELECT * FROM users WHERE id = $1 ` UpdatePassword = ` UPDATE users SET password = $1 WHERE phone = $2 ` DeleteUser = ` DELETE FROM users WHERE id = $1 ` GetPassword = ` SELECT password FROM users WHERE id = $1 ` CreateProject = ` INSERT INTO projects (name, status, teamlead_id, attachment) VALUES ($1, $2, $3, $4) ` GetProjects = ` SELECT * FROM projects ` UpdateProjectStatus = ` UPDATE projects SET status = $1 WHERE id = $2 ` DeleteProject = ` DELETE FROM projects WHERE id = $1 ` GetProject = ` SELECT * FROM projects WHERE id = $1 ` AddAttendance = ` INSERT INTO attendance (type, user_id, date) VALUES ($1, $2, $3) ` GetUserAttendance = ` SELECT * FROM attendance WHERE user_id = $1 AND type = $2 ` CreateTask = `` /* 152-byte string literal not displayed */ UpdateTaskStatus = ` UPDATE tasks SET status = $1 WHERE id = $2 ` GetTasks = ` SELECT * FROM tasks WHERE project_id = $1 AND programmer_id = $2 ` GetTask = ` SELECT * FROM tasks WHERE id = $1 ` DeleteTask = ` DELETE FROM tasks WHERE id = $1 ` StartTask = ` UPDATE tasks SET started_at = $1 WHERE id = $2 ` FinishTask = ` UPDATE tasks SET finished_at = $1 WHERE id = $2 ` WriteComment = ` INSERT INTO comments (task_id, programmer_id, text) VALUES ($1, $2, $3) RETURNING id ` GetComments = ` SELECT * FROM comments WHERE task_id = $1 ` DeleteComment = ` DELETE FROM comments WHERE id = $1 ` )
Functions ¶
func GeneratePasswordHash ¶
GeneratePasswordHash ...
func IsEnumValue ¶
Types ¶
type CreateTaskRequestModel ¶
type CreateTaskResponseModel ¶
type CreateTaskResponseModel struct {
ID int `json:"id"`
}
type DeleteTaskRequestModel ¶
type DeleteUserRequestModel ¶
type GetCommentsRequestModel ¶
type GetCommentsRequestModel struct {
TaskID int `json:"task_id"`
}
type GetTasksRequestModel ¶
type GetWithIDRequestModel ¶
type GetWithIDRequestModel struct {
ID int `json:"id"`
}
type LoginRequestModel ¶
type LoginResponseModel ¶
type LoginResponseModel struct {
ID string `json:"id"`
}
type RegisterResponseModel ¶
type TokenMetadata ¶
func ExtractTokenMetadata ¶
func ExtractTokenMetadata(c *gin.Context) (*TokenMetadata, error)
ExtractTokenMetadata func to extract metadata from JWT.
type WriteCommentResponseModel ¶
type WriteCommentResponseModel struct {
ID int `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.