teamimpl

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrUpdateTeamMemberHook

func AddOrUpdateTeamMemberHook(sess *db.Session, userID, orgID, teamID int64, isExternal bool, permission dashboards.PermissionType) error

AddOrUpdateTeamMemberHook is called from team resource permission service it adds user to a team or updates user permissions in a team within the given transaction session

func ProvideService

func ProvideService(db db.DB, cfg *setting.Cfg) team.Service

func RemoveTeamMemberHook

func RemoveTeamMemberHook(sess *db.Session, cmd *team.RemoveTeamMemberCommand) error

RemoveTeamMemberHook is called from team resource permission service it removes a member from a team within the given transaction session

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) AddTeamMember

func (s *Service) AddTeamMember(userID, orgID, teamID int64, isExternal bool, permission dashboards.PermissionType) error

func (*Service) CreateTeam

func (s *Service) CreateTeam(name, email string, orgID int64) (team.Team, error)

func (*Service) DeleteTeam

func (s *Service) DeleteTeam(ctx context.Context, cmd *team.DeleteTeamCommand) error

func (*Service) GetTeamByID

func (s *Service) GetTeamByID(ctx context.Context, query *team.GetTeamByIDQuery) (*team.TeamDTO, error)

func (*Service) GetTeamMembers

func (s *Service) GetTeamMembers(ctx context.Context, query *team.GetTeamMembersQuery) ([]*team.TeamMemberDTO, error)

func (*Service) GetTeamsByUser

func (s *Service) GetTeamsByUser(ctx context.Context, query *team.GetTeamsByUserQuery) ([]*team.TeamDTO, error)

func (*Service) GetUserTeamMemberships

func (s *Service) GetUserTeamMemberships(ctx context.Context, orgID, userID int64, external bool) ([]*team.TeamMemberDTO, error)

func (*Service) IsTeamMember

func (s *Service) IsTeamMember(orgId int64, teamId int64, userId int64) (bool, error)

func (*Service) RemoveTeamMember

func (s *Service) RemoveTeamMember(ctx context.Context, cmd *team.RemoveTeamMemberCommand) error

func (*Service) RemoveUsersMemberships

func (s *Service) RemoveUsersMemberships(ctx context.Context, userID int64) error

func (*Service) SearchTeams

func (*Service) UpdateTeam

func (s *Service) UpdateTeam(ctx context.Context, cmd *team.UpdateTeamCommand) error

func (*Service) UpdateTeamMember

func (s *Service) UpdateTeamMember(ctx context.Context, cmd *team.UpdateTeamMemberCommand) error

Jump to

Keyboard shortcuts

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