Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaTaskStorage ¶
type MediaTaskStorage interface { GetNewMediaTask(teamId int) (task domain.MediaTask, err error) GetStatusLastMediaTask(teamId int) (status string, err error) GetLastMediaTask(teamId int) (task domain.MediaTask, err error) UpdateAnswerOnMediaTask(taskId int, task domain.MediaAnswer) (err error) GetAnswersOnMediaTasksByFilter(status string) (tasks []domain.MediaTask, err error) UpdatePointsOnMediaTask(status string, taskId int, points int, comment string) (err error) GetPointsOnMediaTask(mediaTaskId int) (points int, err error) CreateAnswerOnMediaTask(teamId int, pointTaskId int) (id int, err error) GetAnswerOnMediaTaskById(answerMediaTaskId int) (task domain.MediaTask, err error) CheckAnswerOnMediaTaskById(answerMediaTaskId int, teamId int) (exist bool, err error) GetAllAnswerOnMediaTasks() (tasks []domain.MediaTask, err error) GetUpdateTimeAnswerOnMediaTask(taskId int) (time time.Time, err error) GetAllMediaTaskByTeam(teamId int) (tasks []domain.MediaTask, err error) GetMediaTaskByTeamById(teamId int, answerId int) (task domain.MediaTask, err error) GetDateAnswerOnMediaTaskById(answerMediaTaskId int) (timeAnswer time.Time, err error) }
type ObjectStorage ¶
type SECStorage ¶
type SECStorage interface { GetSECByFilter() ([]domain.Sec, error) GetSecByID(id int) ([]domain.Sec, error) GetSecByTeamId(teamId int) ([]domain.Sec, error) CreateRegisterOnSEC(masterClassId, teamId int) error DeleteRegisterOnSEC(masterClassId, teamId int) error GetSECAdmin() ([]domain.Sec, error) GetSECAdminById(secId int) ([]domain.Sec, error) CheckRegisterOnMasterClass(masterClassId, teamId int) (bool, error) CheckRegisterOnSec(secId, teamId int) (bool, error) CheckIntersectionTimeInterval(masterClassId, teamId int) (bool, error) CheckMasterClassIsExist(masterClassId int) (bool, error) CheckMasterClassBusyPlaceById(masterClassId, teamId int) (int, error) CheckMasterClassTime(masterClass int) (bool, error) GetMasterClassByID(masterClassId int) (domain.Sec, error) }
type Storage ¶
type Storage interface { TextTaskStorage MediaTaskStorage TeamStorage ObjectStorage UserStorage SECStorage }
func NewStorage ¶
func NewStorage(team TeamStorage, textTask TextTaskStorage, mediaTask MediaTaskStorage, object ObjectStorage, user UserStorage, sec SECStorage) Storage
type TeamStorage ¶
type TeamStorage interface { CheckTeam(teamName string) (exists bool, err error) CreateTeam(teamName string, userId int) (teamId int, err error) CheckUserHasTeamById(userId int) (exists bool, err error) CheckUserExistInTeam(userId, teamId int) (exist bool, err error) CheckUserHasTeamByEmail(email string) (exists bool, err error) CheckUserIsExistByEmail(email string) (id int, err error) SetTeamID(userId int, teamID int) error UpdateTeamName(userId int, teamName string) error DeleteTeam(userId, teamId int) error AddMemberToTeam(userId int, teamId int) error DeleteMemberFromTeam(userId int, teamId int) error GetTeamByUserId(userId int) (domain.Team, error) GetMembersTeam(teamId int) ([]domain.Member, error) GetTeamByFilter(count int) ([]domain.Team, error) GetAllTeams() ([]domain.Team, error) GetTotalPointsByTeamId(teamId int) (totalPoints int, err error) UpdateSpendPointsByTeamId(teamId, deltaPoints int) error UpdateGiverPointsByTeamId(teamId, deltaPoints int) error GetCountUserInTeam(teamId int) (count int, err error) CheckUserRoleById(userId int, role int) (exists bool, err error) }
type TextTaskStorage ¶
type TextTaskStorage interface { GetNewTextTask(teamId int) (domain.TextTask, error) GetLastTextTask(teamId int) (domain.TextTask, error) GetStatusLastTextTask(teamId int) (status bool, err error) CreateAnswerOnTextTask(task domain.TextTask) error UpdateAnswerOnTextTask(task domain.TextTask) error CheckDayNewTask(teamId int) (bool, error) }
Click to show internal directories.
Click to hide internal directories.