team

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package team package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUserToTeamInput

type AddUserToTeamInput struct {
	TeamName     string
	Username     string
	IsMaintainer bool
}

AddUserToTeamInput is the input for adding a new team member.

type CreateTeamInput

type CreateTeamInput struct {
	Name        string
	Description string
}

CreateTeamInput is the input for creating a team.

type DeleteTeamInput

type DeleteTeamInput struct {
	Team *models.Team
}

DeleteTeamInput is the input for deleting a team.

type GetTeamMembersInput

type GetTeamMembersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.TeamMemberSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// UserID filters the team members by user ID
	UserID *string
	// TeamID filters the team members by user ID
	TeamID *string
}

GetTeamMembersInput is the input for querying a list of team members

type GetTeamsInput

type GetTeamsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.TeamSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Search filters team list by teamName
	Search *string
	// UserID filters the team list by user ID
	UserID *string
}

GetTeamsInput is the input for querying a list of teams

type RemoveUserFromTeamInput

type RemoveUserFromTeamInput struct {
	TeamMember *models.TeamMember
}

RemoveUserFromTeamInput is the input for deleting a team member.

type Service

type Service interface {
	GetTeamByID(ctx context.Context, id string) (*models.Team, error)
	GetTeamByPRN(ctx context.Context, prn string) (*models.Team, error)
	GetTeamsByIDs(ctx context.Context, idList []string) ([]models.Team, error)
	GetTeams(ctx context.Context, input *GetTeamsInput) (*db.TeamsResult, error)
	CreateTeam(ctx context.Context, input *CreateTeamInput) (*models.Team, error)
	UpdateTeam(ctx context.Context, input *UpdateTeamInput) (*models.Team, error)
	DeleteTeam(ctx context.Context, input *DeleteTeamInput) error
	GetTeamMember(ctx context.Context, username, teamName string) (*models.TeamMember, error)
	GetTeamMembers(ctx context.Context, input *db.GetTeamMembersInput) (*db.TeamMembersResult, error)
	AddUserToTeam(ctx context.Context, input *AddUserToTeamInput) (*models.TeamMember, error)
	UpdateTeamMember(ctx context.Context, input *UpdateTeamMemberInput) (*models.TeamMember, error)
	RemoveUserFromTeam(ctx context.Context, input *RemoveUserFromTeamInput) error
}

Service implements all team related functionality

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
	activityService activityevent.Service,
) Service

NewService creates an instance of Service

type UpdateTeamInput

type UpdateTeamInput struct {
	MetadataVersion *int
	Description     *string
	ID              string
}

UpdateTeamInput is the input for updating a team.

type UpdateTeamMemberInput

type UpdateTeamMemberInput struct {
	MetadataVersion *int
	TeamName        string
	Username        string
	IsMaintainer    bool
}

UpdateTeamMemberInput is the input for updating a team member.

Jump to

Keyboard shortcuts

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