mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
cee713e34c
* add tracing to team service * another test fix * pass in context for team creation and membership checking
21 lines
990 B
Go
21 lines
990 B
Go
package team
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Service interface {
|
|
CreateTeam(ctx context.Context, name, email string, orgID int64) (Team, error)
|
|
UpdateTeam(ctx context.Context, cmd *UpdateTeamCommand) error
|
|
DeleteTeam(ctx context.Context, cmd *DeleteTeamCommand) error
|
|
SearchTeams(ctx context.Context, query *SearchTeamsQuery) (SearchTeamQueryResult, error)
|
|
GetTeamByID(ctx context.Context, query *GetTeamByIDQuery) (*TeamDTO, error)
|
|
GetTeamsByUser(ctx context.Context, query *GetTeamsByUserQuery) ([]*TeamDTO, error)
|
|
GetTeamIDsByUser(ctx context.Context, query *GetTeamIDsByUserQuery) ([]int64, error)
|
|
IsTeamMember(ctx context.Context, orgId int64, teamId int64, userId int64) (bool, error)
|
|
RemoveUsersMemberships(tx context.Context, userID int64) error
|
|
GetUserTeamMemberships(ctx context.Context, orgID, userID int64, external bool) ([]*TeamMemberDTO, error)
|
|
GetTeamMembers(ctx context.Context, query *GetTeamMembersQuery) ([]*TeamMemberDTO, error)
|
|
RegisterDelete(query string)
|
|
}
|