Documentation ¶
Index ¶
- type GroupInfo
- type GroupStorage
- func (s *GroupStorage) AddGroups(groupIds []chsuAPI.GroupIds) error
- func (s *GroupStorage) GetGroupIds() ([]int, error)
- func (s *GroupStorage) GetGroupNames() ([]string, error)
- func (s *GroupStorage) GetTodaySchedule(groupID int) (string, error)
- func (s *GroupStorage) GetTomorrowSchedule(groupID int) (string, error)
- func (s *GroupStorage) GroupNameIsCorrect(groupName string) (bool, error)
- func (s *GroupStorage) GroupsStartsWith(firstSymbol string) ([]GroupInfo, error)
- func (s *GroupStorage) Start() error
- func (s *GroupStorage) UnusedID(ids []int) ([]int, error)
- func (s *GroupStorage) UpdateSchedule(schedule map[int][2]string) error
- type UserStorage
- func (s *UserStorage) AddUser(userID int64) error
- func (s *UserStorage) ChangeUserGroup(userID int64, groupID int) error
- func (s *UserStorage) DeleteGroup(userID int64) error
- func (s *UserStorage) DeleteUser(userID int64) error
- func (s *UserStorage) GetUserGroup(userID int64) (int, error)
- func (s *UserStorage) GetUsersId() ([]int, error)
- func (s *UserStorage) IsUserHasGroup(userID int64) (bool, error)
- func (s *UserStorage) IsUserInDB(userID int64) (bool, error)
- func (s *UserStorage) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupStorage ¶
type GroupStorage struct {
// contains filtered or unexported fields
}
func NewGroupStorage ¶
func NewGroupStorage(url *sql.DB, logger *logging.Logger) *GroupStorage
func (*GroupStorage) AddGroups ¶
func (s *GroupStorage) AddGroups(groupIds []chsuAPI.GroupIds) error
func (*GroupStorage) GetGroupIds ¶
func (s *GroupStorage) GetGroupIds() ([]int, error)
func (*GroupStorage) GetGroupNames ¶
func (s *GroupStorage) GetGroupNames() ([]string, error)
func (*GroupStorage) GetTodaySchedule ¶
func (s *GroupStorage) GetTodaySchedule(groupID int) (string, error)
func (*GroupStorage) GetTomorrowSchedule ¶
func (s *GroupStorage) GetTomorrowSchedule(groupID int) (string, error)
func (*GroupStorage) GroupNameIsCorrect ¶
func (s *GroupStorage) GroupNameIsCorrect(groupName string) (bool, error)
func (*GroupStorage) GroupsStartsWith ¶
func (s *GroupStorage) GroupsStartsWith(firstSymbol string) ([]GroupInfo, error)
func (*GroupStorage) Start ¶
func (s *GroupStorage) Start() error
func (*GroupStorage) UpdateSchedule ¶
func (s *GroupStorage) UpdateSchedule(schedule map[int][2]string) error
type UserStorage ¶
type UserStorage struct {
// contains filtered or unexported fields
}
func NewUserStorage ¶
func NewUserStorage(url *sql.DB, logger *logging.Logger) *UserStorage
func (*UserStorage) AddUser ¶
func (s *UserStorage) AddUser(userID int64) error
func (*UserStorage) ChangeUserGroup ¶
func (s *UserStorage) ChangeUserGroup(userID int64, groupID int) error
func (*UserStorage) DeleteGroup ¶
func (s *UserStorage) DeleteGroup(userID int64) error
func (*UserStorage) DeleteUser ¶
func (s *UserStorage) DeleteUser(userID int64) error
func (*UserStorage) GetUserGroup ¶
func (s *UserStorage) GetUserGroup(userID int64) (int, error)
func (*UserStorage) GetUsersId ¶
func (s *UserStorage) GetUsersId() ([]int, error)
func (*UserStorage) IsUserHasGroup ¶
func (s *UserStorage) IsUserHasGroup(userID int64) (bool, error)
func (*UserStorage) IsUserInDB ¶
func (s *UserStorage) IsUserInDB(userID int64) (bool, error)
func (*UserStorage) Start ¶
func (s *UserStorage) Start() error
Click to show internal directories.
Click to hide internal directories.