Documentation
¶
Index ¶
- Constants
- Variables
- func GetAllTaskProgresses() []model.TaskProgress
- func InsertTaskProgress(userID uint, taskID uint, progress string) (*model.TaskProgress, error)
- func InsertUser(username string, password string) (*model.User, error)
- func NewConnection() *gorm.DB
- func UpdateTaskProgress(taskProgressID uint, progress string) error
- type InsertError
- type InsertStatus
- type RowError
- type RowStatus
- type UpdateError
- type UpdateStatus
Constants ¶
View Source
const ( RowNotFound = 1 RowNotUnique = 2 RowColumnMisuse = 3 )
View Source
const (
InsertErr = 1
)
View Source
const (
UpdateErr = 1
)
Variables ¶
View Source
var (
Conn *gorm.DB
)
Functions ¶
func GetAllTaskProgresses ¶
func GetAllTaskProgresses() []model.TaskProgress
func InsertTaskProgress ¶
func NewConnection ¶
func UpdateTaskProgress ¶
Types ¶
type InsertError ¶
type InsertError struct {
Status InsertStatus
Message string
}
func (InsertError) Error ¶
func (r InsertError) Error() string
type InsertStatus ¶
type InsertStatus uint
type RowError ¶
func GetAllTasks ¶
func GetTaskProgressByUserID ¶
func GetTaskProgressByUserID(userID uint) ([]model.TaskProgress, *RowError)
func GetTaskProgressByUserIDAndTaskID ¶
func GetTaskProgressByUserIDAndTaskID(userID uint, taskID uint) (*model.TaskProgress, *RowError)
type UpdateError ¶
type UpdateError struct {
Status UpdateStatus
Message string
}
func (UpdateError) Error ¶
func (r UpdateError) Error() string
type UpdateStatus ¶
type UpdateStatus uint
Click to show internal directories.
Click to hide internal directories.