storage

package
v0.0.0-...-bf31d15 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 2 Imported by: 0

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 ObjectStorage interface {
	GetObject(object domain.Object) (domain.Object, error)
	PutObject(object domain.Object) (string, error)
	DeleteObject(object domain.Object) error
}

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 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)
}

type UserStorage

type UserStorage interface {
	GetAllUsers() ([]domain.Member, error)
	GetUserWithoutTeam() ([]domain.Member, error)
	GetUserWithCountTeam(count int) ([]domain.Member, error)
	GetUserById(id int) (domain.Member, error)
}

Jump to

Keyboard shortcuts

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