Documentation
¶
Overview ¶
Package team handles the management of teams and their members.
Index ¶
- type Manager
- func (u *Manager) Create(name, timezone, conversationAssignmentType string, ...) (models.Team, error)
- func (u *Manager) Delete(id int) error
- func (u *Manager) Get(id int) (models.Team, error)
- func (u *Manager) GetAll() ([]models.Team, error)
- func (u *Manager) GetAllCompact() ([]models.TeamCompact, error)
- func (u *Manager) GetMembers(id int) ([]models.TeamMember, error)
- func (u *Manager) GetUserTeams(userID int) ([]models.Team, error)
- func (u *Manager) Update(id int, name, timezone, conversationAssignmentType string, ...) (models.Team, error)
- func (u *Manager) UpsertUserTeams(id int, teamNames []string) error
- func (u *Manager) UserBelongsToTeam(teamID, userID int) (bool, error)
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles team-related operations.
func (*Manager) Create ¶
func (u *Manager) Create(name, timezone, conversationAssignmentType string, businessHrsID, slaPolicyID null.Int, emoji string, maxAutoAssignedConversations int) (models.Team, error)
Create creates a new team.
func (*Manager) Delete ¶
Delete deletes a team by ID also deletes all the team members and unassigns all the conversations belonging to the team.
func (*Manager) GetAllCompact ¶
func (u *Manager) GetAllCompact() ([]models.TeamCompact, error)
GetAllCompact retrieves all teams with limited fields.
func (*Manager) GetMembers ¶
func (u *Manager) GetMembers(id int) ([]models.TeamMember, error)
GetMembers retrieves members of a team.
func (*Manager) GetUserTeams ¶
GetUserTeams retrieves teams of a user by user ID.
func (*Manager) Update ¶
func (u *Manager) Update(id int, name, timezone, conversationAssignmentType string, businessHrsID, slaPolicyID null.Int, emoji string, maxAutoAssignedConversations int) (models.Team, error)
Update updates an existing team.
func (*Manager) UpsertUserTeams ¶
UpsertUserTeams updates/inserts exists user teams
Click to show internal directories.
Click to hide internal directories.